pub struct Hmac<'d> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
Provides an interface for interacting with the HMAC hardware peripheral. It allows users to compute HMACs for cryptographic purposes, ensuring data integrity and authenticity.
Implementations§
Source§impl<'d> Hmac<'d>
impl<'d> Hmac<'d>
Sourcepub fn new(hmac: impl Peripheral<P = HMAC> + 'd) -> Self
pub fn new(hmac: impl Peripheral<P = HMAC> + 'd) -> Self
Creates a new instance of the HMAC peripheral.
Sourcepub fn init(&mut self)
pub fn init(&mut self)
Step 1. Enable HMAC module.
Before these steps, the user shall set the peripheral clocks bits for HMAC and SHA peripherals and clear the corresponding peripheral reset bits.
Sourcepub fn configure(&mut self, m: HmacPurpose, key_id: KeyId) -> Result<(), Error>
pub fn configure(&mut self, m: HmacPurpose, key_id: KeyId) -> Result<(), Error>
Step 2. Configure HMAC keys and key purposes.