pub struct Sha3_512 { /* private fields */ }Expand description
SHA3-512 hash function (FIPS 202, Section 6.1).
Rate = 72 bytes (576 bits), capacity = 128 bytes (1024 bits), output = 64 bytes (512 bits).
Implementations§
Source§impl Sha3_512
impl Sha3_512
Sourcepub const DIGEST_LEN: usize = 64
pub const DIGEST_LEN: usize = 64
Output digest length in bytes (64).
Sourcepub fn finalize(self) -> [u8; 64]
pub fn finalize(self) -> [u8; 64]
Finalizes the hash and returns the 64-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_into(chunks: &[&[u8]], out: &mut [u8; 64])
pub fn digest_chunks_into(chunks: &[&[u8]], out: &mut [u8; 64])
Computes SHA3-512(chunks[0] || chunks[1] || ...) directly into out.
Inputs shorter than one rate block (< 72 bytes) absorb directly into an in-place
Keccak state without allocating an intermediate byte buffer or copying the digest on
return.
Sourcepub fn digest_chunks(chunks: &[&[u8]]) -> [u8; 64]
pub fn digest_chunks(chunks: &[&[u8]]) -> [u8; 64]
Computes SHA3-512(chunks[0] || chunks[1] || ...) in one shot.
Inputs shorter than one rate block (< 72 bytes) absorb directly into an in-place
Keccak state without allocating an intermediate byte buffer or copying the state on return.