pub fn crypto_box_easy(
    ciphertext: &mut [u8],
    message: &[u8],
    nonce: &Nonce,
    recipient_public_key: &PublicKey,
    sender_secret_key: &SecretKey
) -> Result<(), Error>
Expand description

Encrypts message with recipient’s public key recipient_public_key, sender’s secret key sender_secret_key, and nonce. The result is placed into ciphertext which must be the length of the message plus CRYPTO_BOX_MACBYTES bytes, for the message tag.

Compatible with libsodium’s crypto_box_easy.