[]Struct skellige::prelude::blake2::crypto_mac::Output

pub struct Output<M> where
    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> Output<M> where
    M: Mac

pub fn new(bytes: GenericArray<u8, <M as Mac>::OutputSize>) -> Output<M>

Create a new MAC Output.

pub fn into_bytes(self) -> GenericArray<u8, <M as Mac>::OutputSize>

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 for Output<M> where
    M: Mac + Clone,
    <M as Mac>::OutputSize: Clone

impl<M> ConstantTimeEq for Output<M> where
    M: Mac

impl<M> Eq for Output<M> where
    M: Mac

impl<M> PartialEq<Output<M>> for Output<M> where
    M: Mac

Auto Trait Implementations

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

impl<M> Send for Output<M> where
    <M as Mac>::OutputSize: ArrayLength<u8>, 
[src]

impl<M> Sync for Output<M> where
    <M as Mac>::OutputSize: ArrayLength<u8>, 
[src]

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

impl<M> UnwindSafe for Output<M> where
    <<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe
[src]

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.