safe_encrypt_with_label

Function safe_encrypt_with_label 

Source
pub fn safe_encrypt_with_label(
    public_key: &[u8],
    plaintext: &[u8],
    ciphersuite: Ciphersuite,
    context: SafeEncryptionContext<'_>,
    crypto: &impl OpenMlsCrypto,
) -> Result<HpkeCiphertext, Error>
Available on (32-bit or 64-bit) and crate feature extensions-draft-08 only.
Expand description

Encrypt the provided plaintext for the public_key. The SafeEncryptionContext is used to set the ComponentId, label, and optional context.

Returns an HpkeCiphertext or an Error.