Struct sha2_const::Sha256 [−][src]
pub struct Sha256 { /* fields omitted */ }
Expand description
The SHA-256 hash function.
Examples
const DIGEST: [u8; 32] = Sha256::new()
.update(b"The quick brown fox ")
.update(b"jumps over the lazy dog")
.finalize();
assert_eq!(
hex::encode(&DIGEST[..]),
"d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"
);
Implementations
The internal block size of the hash function.
The digest size of the hash function.