Function encrypt

Source
pub fn encrypt(
    key: &Key,
    msg_ctxt: &mut [u8],
    iv: Iv,
    aad: &[u8],
) -> Result<Tag, Error>
Expand description

AEAD encrypt the message in msg_ctxt with the key, iv and aad.

Returns the Tag and the ciphertext in msg_ctxt.