Struct hmac::Hmac
[−]
[src]
pub struct Hmac<D> where
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>, { /* fields omitted */ }The Hmac struct represents an HMAC using a given hash function D.
Trait Implementations
impl<D: Clone> Clone for Hmac<D> where
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>,
D::BlockSize: Clone, [src]
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>,
D::BlockSize: Clone,
fn clone(&self) -> Hmac<D>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<D: Debug> Debug for Hmac<D> where
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>,
D::BlockSize: Debug, [src]
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>,
D::BlockSize: Debug,
impl<D> Mac for Hmac<D> where
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>, [src]
D: Input + BlockInput + FixedOutput + Default,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
type OutputSize = D::OutputSize
fn new(key: &[u8]) -> Hmac<D>[src]
Create new MAC instance. DO NOT USE low-entropy keys (e.g. passwords)! Read more
fn input(&mut self, data: &[u8])[src]
Process input data.
fn result(self) -> MacResult<D::OutputSize>[src]
Obtain the result of a Mac computation as a MacResult.
fn verify(self, code: &[u8]) -> bool[src]
Check if code is correct for the processed input