Function liserk_client::basic_decrypt
source · pub fn basic_decrypt(
key: &[u8; 32],
nonce: &[u8; 12],
ciphertext: &[u8],
associated_data: &[u8]
) -> Result<Vec<u8>, Error>Expand description
Decrypts ciphertext using AES-GCM-SIV algorithm.
Arguments
key- A reference to the 256-bit key for decryption.nonce- A reference to the 12-byte nonce.ciphertext- A reference to the encrypted data.associated_data- A reference to the associated data.
Returns
Result<Vec<u8>, Error>- The decrypted data as a vector of bytes, or an error if decryption fails.