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]
impl<N> MacResult<N> where
N: ArrayLength<u8>,
pub fn new(code: GenericArray<u8, N>) -> MacResult<N>
[src]
pub fn new(code: GenericArray<u8, N>) -> MacResult<N>
Create a new MacResult.
pub fn code(self) -> GenericArray<u8, N>
[src]
pub fn code(self) -> GenericArray<u8, N>
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: Clone + ArrayLength<u8>> Clone for MacResult<N>
fn clone(&self) -> MacResult<N>
[src]
fn clone(&self) -> MacResult<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<N> PartialEq for MacResult<N> where
N: ArrayLength<u8>,
[src]
impl<N> PartialEq for MacResult<N> where
N: ArrayLength<u8>,
fn eq(&self, x: &MacResult<N>) -> bool
[src]
fn eq(&self, x: &MacResult<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl<N> Eq for MacResult<N> where
N: ArrayLength<u8>,
[src]
impl<N> Eq for MacResult<N> where
N: ArrayLength<u8>,
Auto Trait Implementations
impl<N> Send for MacResult<N> where
<N as ArrayLength<u8>>::ArrayType: Send,
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,
impl<N> Sync for MacResult<N> where
<N as ArrayLength<u8>>::ArrayType: Sync,