Skip to main content

Module sha3

Module sha3 

Source
Expand description

§SHA-3 hash algorithms

Provides implementations of the SHA3-256 and SHA3-512 hash algorithms.

SHA-3 hashes are unkeyed cryptographic hash functions. They turn arbitrary input bytes into fixed-size digests. Hashes are useful for fingerprints and compatibility with protocols that require SHA-3, but they do not authenticate messages by themselves. Use crate::auth or crate::hmac when a secret key must be involved.

§Example

use dryoc::sha3::Sha3256;

let mut state = Sha3256::new();
state.update(b"The web of our life is of a mingled yarn.");
let hash = state.finalize_to_vec();
assert_eq!(hash.len(), 32);

Structs§

Sha3256
SHA3-256 wrapper, provided for convenience.
Sha3512
SHA3-512 wrapper, provided for convenience.

Type Aliases§

Sha3256Digest
Type alias for SHA3-256 digest, provided for convenience.
Sha3512Digest
Type alias for SHA3-512 digest, provided for convenience.