pub trait GroestlShortInternal {
type State: Clone;
// Required methods
fn state_from_bytes(block: &[u8; 64]) -> Self::State;
fn state_to_bytes(state: &Self::State) -> [u8; 64];
fn xor_state(h: &mut Self::State, m: &Self::State);
fn p_perm(h: &mut Self::State);
fn q_perm(h: &mut Self::State);
// Provided method
fn compress(h: &mut Self::State, m: &[u8; 64]) { ... }
}
Expand description
Internal implementation of subcomponents of the Grøstl hash function.
This abstracts over optimized implementations of subcomponents using different architecture-specific instructions, while sharing the code for hash function construction.
Required Associated Types§
Required Methods§
fn state_from_bytes(block: &[u8; 64]) -> Self::State
fn state_to_bytes(state: &Self::State) -> [u8; 64]
fn xor_state(h: &mut Self::State, m: &Self::State)
fn p_perm(h: &mut Self::State)
fn q_perm(h: &mut Self::State)
Provided Methods§
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.