[][src]Function sodiumoxide::crypto::sealedbox::curve25519blake2bxsalsa20poly1305::seal

pub fn seal(m: &[u8], pk: &PublicKey) -> Vec<u8>

The seal() function encrypts a message m for a recipient whose public key is pk. It returns the ciphertext whose length is SEALBYTES + m.len().

The function creates a new key pair for each message, and attaches the public key to the ciphertext. The secret key is overwritten and is not accessible after this function returns.