Permutation

Trait Permutation 

Source
pub trait Permutation: Copy + Default {
    type State: PermutationState;

    // Required method
    fn apply(self, state: &mut Self::State);
}
Expand description

A cryptographic permutation.

Required Associated Types§

Source

type State: PermutationState

The state this permutation acts upon.

Splitting this type out allows for different permutations to act on the same state. For example, keccak-p[1600, n] can act on the same state regardless the number of rounds n.

Required Methods§

Source

fn apply(self, state: &mut Self::State)

Apply the permutation to the state.

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.

Implementors§