pub struct Hmac<'d> { /* private fields */ }Expand description
Provides an interface for interacting with the HMAC hardware peripheral. Computes HMACs for cryptographic purposes and ensures data integrity and authenticity.
Implementations§
Source§impl<'d> Hmac<'d>
impl<'d> Hmac<'d>
Sourcepub fn init(&mut self)
pub fn init(&mut self)
Enables the HMAC module.
Before these steps, the peripheral clock bits for HMAC and SHA must be set and the corresponding peripheral reset bits must be cleared.
Sourcepub fn configure(&mut self, m: HmacPurpose, key_id: KeyId) -> Result<(), Error>
pub fn configure(&mut self, m: HmacPurpose, key_id: KeyId) -> Result<(), Error>
Configures HMAC keys and key purposes.
Auto Trait Implementations§
impl<'d> !UnwindSafe for Hmac<'d>
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> UnsafeUnpin 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