pub fn encrypt_bytes(
plaintext: &[u8],
key: &[u8; 32],
nonce: &[u8; 24],
aad: &[u8],
) -> Result<(Vec<u8>, Algorithm), CryptError>Expand description
Encrypts the given plaintext, authenticating aad alongside it.
In v2 the associated data is always a serialized
HeaderBinding, which ties the
ciphertext to its header and its purpose (filename vs content).