Trait Sha256Hmac

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

Something which can calculate a SHA-256 HMAC.

Required Methods§

Source

fn update(&mut self, data: &[u8]) -> Result<(), InternalError>

Update the HMAC context with the provided data.

Source

fn finalize(&mut self) -> Result<Vec<u8>, InternalError>

Return the HMAC result.

§Note

This method should prepare the context for reuse.

Implementations on Foreign Types§

Source§

impl Sha256Hmac for Hmac<Sha256>

Source§

fn update(&mut self, data: &[u8]) -> Result<(), InternalError>

Source§

fn finalize(&mut self) -> Result<Vec<u8>, InternalError>

Implementors§