Function dryoc::classic::crypto_box::crypto_box_seal[][src]

pub fn crypto_box_seal(
    ciphertext: &mut [u8],
    message: &[u8],
    recipient_public_key: &PublicKey
) -> Result<(), Error>
Expand description

Encrypts message with recipient’s public key recipient_public_key, using an ephemeral keypair and nonce. The length of ciphertext must be the length of the message plus CRYPTO_BOX_SEALBYTES bytes for the message tag and ephemeral public key.

Compatible with libsodium’s crypto_box_seal.