Function botan::nist_key_wrap [−][src]
pub fn nist_key_wrap(kek: &[u8], key: &[u8]) -> Result<Vec<u8>>
Wrap a key using NIST’s AES key wrap algorithm.
The kek (key-encryption-key) must be a valid length for an AES key. The wrapped key must be a multiple of 8 bytes.
Examples
// Wrap a 128-bit key with a 256-bit key: let key = vec![0; 16]; let kek = vec![0; 32]; let wrapped = botan::nist_key_wrap(&kek, &key).unwrap();