sha3 0.8.2

SHA-3 (Keccak) hash function

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
  • SHAKE128, an extendable output function (XOF)
  • SHAKE256, an extendable output function (XOF)
  • Keccak224, Keccak256, Keccak384, Keccak512 (NIST submission without padding changes)


An example of using SHA3-256 is:

# #[macro_use] extern crate hex_literal;
# extern crate sha3;
# fn main() {
use sha3::{Digest, Sha3_256};

// create a SHA3-256 object
let mut hasher = Sha3_256::new();

// write input message

// read hash digest
let result = hasher.result();

assert_eq!(result[..], hex!("
# }

Also see RustCrypto/hashes readme.