pub fn decrypt_detached(
key: &Key,
ctxt: impl AsRef<[u8]>,
iv: Iv,
aad: impl AsRef<[u8]>,
tag: &Tag,
) -> Result<Vec<u8>, Error>
Expand description
AEAD decrypt the ciphertext in ctxt
with the key
, iv
, aad
, and
tag
.
Returns the plaintext in ctxt_msg
or an error if the decryption fails.