pub trait Mac {
    fn mac_size(&self) -> usize;
fn update(&mut self, data: &[u8]);
fn digest(&mut self, digest: &mut [u8]) -> Result<()>; }
Expand description

A message authentication code.

A MAC is a symmetric signature primitive.

Required methods

Size of the MAC tag i.e. the signature in bytes.

Add data to be signed.

Produce the MAC tag digest for all data fed via update().

Returns InvalidArgument if digest is not Self::mac_size.

Implementors