pub trait Constants<const KLEN: usize, T> {
// Required methods
fn constant_words() -> [T; KLEN];
fn initial_hash() -> [T; 8];
}
Expand description
Implement this for your constants to be used in the SHA-2 algorithm
Note that the SHA-256 algorithm uses a list of 64 constant u32
words.
The SHA-512 algorithm uses a list of 80 constant u64
words.
Required Methods§
fn constant_words() -> [T; KLEN]
fn initial_hash() -> [T; 8]
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.