pub struct Kmac256 { /* private fields */ }Expand description
KMAC256 (cSHAKE256-based MAC) as defined in SP 800-185.
§One-shot API
ⓘ
use crypto::sha3::Kmac256;
let key = b"super secret key 32 bytes!";
let mut tag = [0u8; 64];
Kmac256::mac(key, b"message", b"customization", &mut tag);§Incremental API
ⓘ
use crypto::sha3::Kmac256;
let key = b"super secret key 32 bytes!";
let mut kmac = Kmac256::new(key, b"customization");
kmac.update(b"hello ");
kmac.update(b"world");
let mut tag = [0u8; 64];
kmac.finalize_into(&mut tag);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kmac256
impl RefUnwindSafe for Kmac256
impl Send for Kmac256
impl Sync for Kmac256
impl Unpin for Kmac256
impl UnsafeUnpin for Kmac256
impl UnwindSafe for Kmac256
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