pub struct HmacCtx(/* private fields */);Expand description
HMAC context bound to a specific digest algorithm.
Implementations§
Source§impl HmacCtx
impl HmacCtx
Sourcepub fn update(&mut self, data: &[u8]) -> Result<(), ErrorStack>
pub fn update(&mut self, data: &[u8]) -> Result<(), ErrorStack>
Feed data into the HMAC computation.
§Errors
Sourcepub fn finish(&mut self, out: &mut [u8]) -> Result<usize, ErrorStack>
pub fn finish(&mut self, out: &mut [u8]) -> Result<usize, ErrorStack>
Finalise the HMAC.
§Errors
Sourcepub fn finish_to_vec(&mut self) -> Result<Vec<u8>, ErrorStack>
pub fn finish_to_vec(&mut self) -> Result<Vec<u8>, ErrorStack>
Finalise and return the HMAC in a freshly allocated Vec<u8>.
§Errors
Auto Trait Implementations§
impl Freeze for HmacCtx
impl RefUnwindSafe for HmacCtx
impl Send for HmacCtx
impl !Sync for HmacCtx
impl Unpin for HmacCtx
impl UnsafeUnpin for HmacCtx
impl UnwindSafe for HmacCtx
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