[−][src]Crate sha3
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)
Usage
An example of using SHA3-256
is:
use hex_literal::hex; use sha3::{Digest, Sha3_256}; // create a SHA3-256 object let mut hasher = Sha3_256::new(); // write input message hasher.update(b"abc"); // read hash digest let result = hasher.finalize(); assert_eq!(result[..], hex!(" 3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532 ")[..]);
Also see RustCrypto/hashes readme.
Re-exports
pub use digest; |
Structs
Keccak224 | Keccak-224 hash function. |
Keccak256 | Keccak-256 hash function. |
Keccak256Full | SHA-3 variant used in CryptoNight. |
Keccak384 | Keccak-384 hash function. |
Keccak512 | Keccak-512 hash function. |
Sha3XofReader | Reader state for extracting extendable output. |
Sha3_224 | SHA-3-224 hash function. |
Sha3_256 | SHA-3-256 hash function. |
Sha3_384 | SHA-3-384 hash function. |
Sha3_512 | SHA-3-512 hash function. |
Shake128 | SHAKE128 extendable output (XOF) hash function |
Shake256 | SHAKE256 extendable output (XOF) hash function |
Traits
Digest | The |