pub struct HMac { /* private fields */ }Expand description
Main hmac-sha256 structure.
Usage:
extern crate dumb_crypto;
use::dumb_crypto::hmac::HMac;
let mut hmac = HMac::new(b"secret key");
hmac.update(b"hello world");
assert_eq!(hmac.digest().to_vec(), vec![
0xc6, 0x1b, 0x51, 0x98, 0xdf, 0x58, 0x63, 0x9e,
0xdb, 0x98, 0x92, 0x51, 0x47, 0x56, 0xb8, 0x9a,
0x36, 0x85, 0x6d, 0x82, 0x6e, 0x5d, 0x85, 0x02,
0x3a, 0xb1, 0x81, 0xb4, 0x8e, 0xa5, 0xd0, 0x18,
]);Implementations§
Auto Trait Implementations§
impl Freeze for HMac
impl RefUnwindSafe for HMac
impl Send for HMac
impl Sync for HMac
impl Unpin for HMac
impl UnwindSafe for HMac
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