[][src]Struct crypto_mac::MacResult

pub struct MacResult<N: ArrayLength<u8>> { /* fields omitted */ }

MacResult is a thin wrapper around bytes array which provides a safe Eq implementation that runs in a fixed time.

Methods

impl<N> MacResult<N> where
    N: ArrayLength<u8>, 
[src]

pub fn new(code: GenericArray<u8, N>) -> MacResult<N>[src]

Create a new MacResult.

pub fn code(self) -> GenericArray<u8, N>[src]

Get the code value as a bytes array.

Be very careful using this method, since incorrect use of the code value may permit timing attacks which defeat the security provided by the Mac trait.

Trait Implementations

impl<N: Clone + ArrayLength<u8>> Clone for MacResult<N>[src]

impl<N> ConstantTimeEq for MacResult<N> where
    N: ArrayLength<u8>, 
[src]

impl<N> Eq for MacResult<N> where
    N: ArrayLength<u8>, 
[src]

impl<N> PartialEq<MacResult<N>> for MacResult<N> where
    N: ArrayLength<u8>, 
[src]

Auto Trait Implementations

impl<N> Send for MacResult<N>

impl<N> Sync for MacResult<N>

impl<N> Unpin for MacResult<N> where
    <N as ArrayLength<u8>>::ArrayType: Unpin

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[src]

type Output = T

Should always be Self

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.