Expand description
Implementation of the Skein family of cryptographic hash algorithms.
There are 3 standard versions of the Skein hash function:
Output size of the Skein hash functions is arbitrary, so it has to be fixed using additional type parameter
§Examples
Hash functionality is usually accessed via the Digest
trait:
use hex_literal::hex;
use skein::{Digest, Skein512, consts::U32};
// Create a Skein-512-256 hasher object
let mut hasher = Skein512::<U32>::new();
// Write input message
hasher.update(b"The quick brown fox ");
hasher.update(b"jumps over the lazy dog");
// Read hash digest
let result = hasher.finalize();
let expected = hex!("b3250457e05d3060b1a4bbc1428bc75a3f525ca389aeab96cfa34638d96e492a");
assert_eq!(result[..], expected[..]);
Also see RustCrypto/hashes readme.
Re-exports§
pub use digest;
Modules§
- Type aliases for many constants.
Structs§
- Skein-256 core hasher state
- Skein-512 core hasher state
- Skein-1024 core hasher state
Traits§
- Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
Type Aliases§
- Skein-256 hasher state
- Skein-512 hasher state
- Skein-1024 hasher state