Expand description
An implementation of the FSB cryptographic hash algorithms. The FSB hash function was one of the submissions to SHA-3, the cryptographic hash algorithm competition organized by the NIST.
There are 5 standard versions of the FSB hash function:
FSB-160
FSB-224
FSB-256
FSB-384
FSB-512
§Examples
Output size of FSB-256 is fixed, so its functionality is usually
accessed via the Digest
trait:
use hex_literal::hex;
use fsb::{Digest, Fsb256};
// create a FSB-256 object
let mut hasher = Fsb256::new();
// write input message
hasher.update(b"hello");
// read hash digest
let result = hasher.finalize();
assert_eq!(result[..], hex!("
0f036dc3761aed2cba9de586a85976eedde6fa8f115c0190763decc02f28edbc
")[..]);
Also see RustCrypto/hashes readme.
Re-exports§
pub use digest;
Structs§
- Fsb160
Core - Core FSB-160 hasher state
- Fsb224
Core - Core FSB-224 hasher state
- Fsb256
Core - Core FSB-256 hasher state
- Fsb384
Core - Core FSB-384 hasher state
- Fsb512
Core - Core FSB-512 hasher state
Traits§
- Digest
- Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.