pub struct Hmac<'d> { /* private fields */ }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 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.
Auto Trait Implementations§
impl<'d> Freeze for Hmac<'d>
impl<'d> RefUnwindSafe for Hmac<'d>
impl<'d> Send for Hmac<'d>
impl<'d> Sync for Hmac<'d>
impl<'d> Unpin for Hmac<'d>
impl<'d> !UnwindSafe for Hmac<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more