pub struct Sha3_256 { /* private fields */ }Expand description
SHA3-256 hash function (FIPS 202, Section 6.1).
Rate = 136 bytes (1088 bits), capacity = 64 bytes (512 bits), output = 32 bytes (256 bits).
Implementations§
Source§impl Sha3_256
impl Sha3_256
Sourcepub const DIGEST_LEN: usize = 32
pub const DIGEST_LEN: usize = 32
Output digest length in bytes (32).
Sourcepub fn finalize(self) -> [u8; 32]
pub fn finalize(self) -> [u8; 32]
Finalizes the hash and returns the 32-byte digest.
Finalizes self.sponge in place via &mut so Drop zeroizes the caller’s original
sponge storage (state and input buffer) without creating an unzeroized stack copy.
Sourcepub fn digest_chunks(chunks: &[&[u8]]) -> [u8; 32]
pub fn digest_chunks(chunks: &[&[u8]]) -> [u8; 32]
Computes SHA3-256(chunks[0] || chunks[1] || ...) in one shot.
Inputs shorter than one rate block (< 136 bytes) absorb directly into an in-place
Keccak state without allocating an intermediate byte buffer or copying the state on return.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sha3_256
impl RefUnwindSafe for Sha3_256
impl Send for Sha3_256
impl Sync for Sha3_256
impl Unpin for Sha3_256
impl UnsafeUnpin for Sha3_256
impl UnwindSafe for Sha3_256
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