pub struct Keccak256 { /* private fields */ }Expand description
The KECCAK-256 hash function
§Examples
const DIGEST: [u8; 32] = Keccak256::new()
.update(b"The quick brown fox ")
.update(b"jumps over the lazy dog")
.finalize();
assert_eq!(
[
0x4d, 0x74, 0x1b, 0x6f, 0x1e, 0xb2, 0x9c, 0xb2, 0xa9, 0xb9, 0x91, 0x1c, 0x82, 0xf5,
0x6f, 0xa8, 0xd7, 0x3b, 0x04, 0x95, 0x9d, 0x3d, 0x9d, 0x22, 0x28, 0x95, 0xdf, 0x6c,
0x0b, 0x28, 0xaa, 0x15
],
DIGEST,
);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keccak256
impl RefUnwindSafe for Keccak256
impl Send for Keccak256
impl Sync for Keccak256
impl Unpin for Keccak256
impl UnwindSafe for Keccak256
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