pub fn decrypt_aes_gcm(
key: &[u8],
nonce: &[u8],
ciphertext: &[u8],
) -> Result<Bytes, CryptoError>Expand description
Decrypt and authenticate ciphertext with AES-256-GCM using key and nonce.
ยงErrors
Returns CryptoError::InvalidKeyLength if key is not 32 bytes,
CryptoError::InvalidNonceLength if nonce is not 12 bytes, or
CryptoError::DecryptionFailed if decryption or authentication fails.