Trait cryptraits::hmac::Hmac

source ·
pub trait Hmac: Zeroize {
    type E: Error;

    fn new_from_slice(key: &[u8]) -> Result<Self, Self::E>
    where
        Self: Sized
; fn update(&mut self, data: &[u8]); fn verify_slice(self, tag: &[u8]) -> Result<(), Self::E>; fn finalize(self) -> Vec<u8>; }
Expand description

Trait represents HMAC.

Required Associated Types§

HMAC Error type.

Required Methods§

Create new value from variable size key.

Update state using the provided data.

Check truncated tag correctness using all bytes of calculated tag.

Obtain the result of a MAC computation as a Vec and consume MAC instance.

Implementors§