Skip to main content

encrypt_data

Function encrypt_data 

Source
pub fn encrypt_data(data: &[u8], key: &[u8; 32]) -> Result<Vec<u8>>
Expand description

Encrypt data with a 32-byte key using AES-256-GCM, returns a byte vector containing the nonce, ciphertext, and tag or an error if encryption fails.