pub fn unwrap_key(
key: &AesKey,
iv: Option<[u8; 8]>,
out: &mut [u8],
in_: &[u8],
) -> Result<usize, KeyError>
Expand description
Unwrap a key, according to RFC 3394
key
: The key-encrypting-key to decrypt the wrapped key. Must be a decrypting keyiv
: The same IV used for wrapping the keyout
: The buffer to write the unwrapped key toin_
: The input ciphertext
Returns the number of bytes written into out
ยงPanics
Panics if either out
or in_
do not have sizes that are a multiple of 8, or
if in_
is not 8 bytes longer than out
This corresponds to AES_unwrap_key
.