Skip to main content

decrypt

Function decrypt 

Source
pub fn decrypt(secret: &[u8], data: &[u8]) -> Option<Vec<u8>>
Expand description

Decrypt a nonce || ciphertext+tag blob produced by encrypt. Returns None when the blob is truncated, the secret is wrong, or the tag fails to authenticate (tampering).