Struct crypto_mac::Output[][src]

pub struct Output<M: Mac> { /* fields omitted */ }

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

Implementations

impl<M: Mac> Output<M>[src]

pub fn new(bytes: GenericArray<u8, M::OutputSize>) -> Output<M>[src]

Create a new MAC Output.

pub fn into_bytes(self) -> GenericArray<u8, M::OutputSize>[src]

Get the MAC tag/code value as a byte array.

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

Trait Implementations

impl<M: Clone + Mac> Clone for Output<M> where
    M::OutputSize: Clone
[src]

impl<M: Mac> ConstantTimeEq for Output<M>[src]

impl<M: Mac> Eq for Output<M>[src]

impl<M: Mac> PartialEq<Output<M>> for Output<M>[src]

Auto Trait Implementations

impl<M> RefUnwindSafe for Output<M> where
    <<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<M> Send for Output<M>

impl<M> Sync for Output<M>

impl<M> Unpin for Output<M> where
    <<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: Unpin

impl<M> UnwindSafe for Output<M> where
    <<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: 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[src]

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.