Struct crypto_mac::MacResult[][src]

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]

Create a new MacResult.

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.

Check if equality to provided slice in constant time

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Auto Trait Implementations

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

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