pub struct AesKeyWrap<C> { /* private fields */ }Expand description
AES Key Wrap (RFC 3394) over 64-bit semiblocks with the default IV.
This is the no-padding variant standardized in RFC 3394 and SP 800-38F. Inputs must be a multiple of 8 bytes and at least 16 bytes long.
Implementations§
Source§impl<C> AesKeyWrap<C>
impl<C> AesKeyWrap<C>
Source§impl<C: BlockCipher> AesKeyWrap<C>
impl<C: BlockCipher> AesKeyWrap<C>
Sourcepub fn wrap_key(&self, key_data: &[u8]) -> Option<Vec<u8>>
pub fn wrap_key(&self, key_data: &[u8]) -> Option<Vec<u8>>
Wrap key material with the RFC 3394 default IV (A6A6A6A6A6A6A6A6).
Returns None when key_data is not a multiple of 8 bytes or is
shorter than 16 bytes.
Sourcepub fn wrap_key_with_iv(&self, key_data: &[u8], iv: &[u8; 8]) -> Option<Vec<u8>>
pub fn wrap_key_with_iv(&self, key_data: &[u8], iv: &[u8; 8]) -> Option<Vec<u8>>
Wrap key material with an explicit 64-bit initial register value.
Returns None when key_data is not a multiple of 8 bytes or is
shorter than 16 bytes.
Auto Trait Implementations§
impl<C> Freeze for AesKeyWrap<C>where
C: Freeze,
impl<C> RefUnwindSafe for AesKeyWrap<C>where
C: RefUnwindSafe,
impl<C> Send for AesKeyWrap<C>where
C: Send,
impl<C> Sync for AesKeyWrap<C>where
C: Sync,
impl<C> Unpin for AesKeyWrap<C>where
C: Unpin,
impl<C> UnsafeUnpin for AesKeyWrap<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for AesKeyWrap<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more