Skip to main content

HmacContext

Trait HmacContext 

Source
pub trait HmacContext: Send {
    // Required methods
    fn update(&mut self, data: &[u8]);
    fn finish(&mut self) -> Result<&[u8]>;
}
Expand description

Incrementally compute a HMAC, see CryptoProvider::hmac

Required Methods§

Source

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

Updates the HMAC with all the data in data.

It is implementation-defined behaviour to call this after calling Self::finish

Source

fn finish(&mut self) -> Result<&[u8]>

Finalizes the HMAC calculation and returns the HMAC value.

It is implementation-defined behaviour to call this after calling Self::finish

Implementors§