wrap_key

Function wrap_key 

Source
pub fn wrap_key(kek: &[u8], dek: &[u8], aad: &[u8]) -> Result<Vec<u8>>
Expand description

Wrap the DEK under a KEK (Key Encryption Key) using AES-256-GCM. Additional Authenticated Data (AAD) is used to prevent key substitution. Returns the nonce (12 bytes) prepended to the ciphertext.