Struct crypto::ciphers::aes_kw::AesKeyWrap[][src]

pub struct AesKeyWrap<'a, T> { /* fields omitted */ }
This is supported on crate feature aes-kw only.

The AES Key Wrap Algorithm as defined in RFC3394

Implementations

impl<'a, T> AesKeyWrap<'a, T>[src]

pub const BLOCK: usize[src]

pub fn new(key: &'a [u8]) -> Self[src]

impl<'a, T> AesKeyWrap<'a, T> where
    T: NewBlockCipher, 
[src]

impl<'a, T> AesKeyWrap<'a, T> where
    T: BlockEncrypt + BlockDecrypt + NewBlockCipher, 
[src]

pub fn wrap_key(&self, plaintext: &[u8], ciphertext: &mut [u8]) -> Result<()>[src]

Wraps a key using the AES Key Wrap algorithm.

See RFC3394.

pub fn unwrap_key(&self, ciphertext: &[u8], plaintext: &mut [u8]) -> Result<()>[src]

Unwraps an encrypted key using the AES Key Wrap algorithm.

See RFC3394.

Trait Implementations

impl<'a, T: Clone> Clone for AesKeyWrap<'a, T>[src]

impl<'a, T: Copy> Copy for AesKeyWrap<'a, T>[src]

impl<'a, T: Debug> Debug for AesKeyWrap<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for AesKeyWrap<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for AesKeyWrap<'a, T> where
    T: Send

impl<'a, T> Sync for AesKeyWrap<'a, T> where
    T: Sync

impl<'a, T> Unpin for AesKeyWrap<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for AesKeyWrap<'a, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.