Skip to main content

crypto_aead_chacha20poly1305_ietf_decrypt_inplace

Function crypto_aead_chacha20poly1305_ietf_decrypt_inplace 

Source
pub fn crypto_aead_chacha20poly1305_ietf_decrypt_inplace(
    data: &mut [u8],
    associated_data: Option<&[u8]>,
    nonce: &Nonce,
    key: &Key,
) -> Result<(), Error>
Expand description

Decrypts data in place after verifying the appended authentication tag.

After success, the first data.len() - CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES bytes contain the plaintext.

ยงErrors

Returns an error if data is shorter than an authentication tag or authentication fails.