pub struct Keccak256 { /* private fields */ }
Expand description
Simple Keccak-256
hasher.
Note that the “native-keccak” feature is not supported for this struct, and will default to the
tiny_keccak
implementation.
Implementations§
Source§impl Keccak256
impl Keccak256
Sourcepub fn update(&mut self, bytes: impl AsRef<[u8]>)
pub fn update(&mut self, bytes: impl AsRef<[u8]>)
Absorbs additional input. Can be called multiple times.
Sourcepub fn finalize_into(self, output: &mut [u8])
pub fn finalize_into(self, output: &mut [u8])
Sourcepub fn finalize_into_array(self, output: &mut [u8; 32])
pub fn finalize_into_array(self, output: &mut [u8; 32])
Pad and squeeze the state into output
.
Sourcepub unsafe fn finalize_into_raw(self, output: *mut u8)
pub unsafe fn finalize_into_raw(self, output: *mut u8)
Pad and squeeze the state into output
.
§Safety
output
must point to a buffer that is at least 32-bytes long.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)