Struct crypto::hmac::Hmac [-] [+] [src]

pub struct Hmac<D> {
    // some fields omitted
}

The Hmac struct represents an Hmac function - a Message Authentication Code using a Digest.

Methods

impl<D: Digest> Hmac<D>

fn new(digest: D, key: &[u8]) -> Hmac<D>

Create a new Hmac instance.

Arguments

  • digest - The Digest to use.
  • key - The key to use.

Trait Implementations

impl<D: Digest> Mac for Hmac<D>

fn input(&mut self, data: &[u8])

fn reset(&mut self)

fn result(&mut self) -> MacResult

fn raw_result(&mut self, output: &mut [u8])

fn output_bytes(&self) -> usize