Function sodiumoxide::crypto::aead::chacha20poly1305_ietf::open_detached
[−]
[src]
pub fn open_detached(
c: &mut [u8],
ad: Option<&[u8]>,
t: &Tag,
n: &Nonce,
k: &Key
) -> Result<(), ()>
open_detached() verifies and decrypts a ciphertext c toghether with optional plaintext data ad
and and authentication tag tag, using a secret key k and a nonce n.
c is decrypted in place, so if this function is successful it will contain the plaintext.
If the ciphertext fails verification, open_detached() returns Err(()),
and the ciphertext is not modified.