Module cryptoxide::sha3 [−][src]
Expand description
An implementation of the SHA-3 cryptographic hash algorithms.
There are 6 standard algorithms specified in the SHA-3 standard:
SHA3-224
SHA3-256
SHA3-384
SHA3-512
Keccak224
,Keccak256
,Keccak384
,Keccak512
(NIST submission without padding changes)
Based on an implementation by Sébastien Martini
Examples
An example of using SHA3-256
is:
use cryptoxide::{digest::Digest, sha3::Sha3_256};
// create a SHA3-256 context
let mut context = Sha3_256::new();
// write input message
context.input(b"abc");
// get hash digest
let mut out = [0u8; 32];
context.result(&mut out);