pub trait Salsa20 {
type Lanes: ArrayLength;
type Block: BlockType;
// Required methods
fn read(ptr: GenericArray<&Self::Block, Self::Lanes>) -> Self;
fn write(&self, ptr: GenericArray<&mut Self::Block, Self::Lanes>);
fn keystream<const ROUND_PAIRS: usize>(&mut self);
// Provided methods
fn shuffle_in(_ptr: &mut Align64<[u32; 16]>) { ... }
fn shuffle_out(_ptr: &mut Align64<[u32; 16]>) { ... }
}
Expand description
A trait for salsa20 block types
Required Associated Types§
Required Methods§
Sourcefn read(ptr: GenericArray<&Self::Block, Self::Lanes>) -> Self
fn read(ptr: GenericArray<&Self::Block, Self::Lanes>) -> Self
Read block(s)
Sourcefn write(&self, ptr: GenericArray<&mut Self::Block, Self::Lanes>)
fn write(&self, ptr: GenericArray<&mut Self::Block, Self::Lanes>)
Write block(s) back
The original/saved value must be present in the pointer.
Provided Methods§
Sourcefn shuffle_in(_ptr: &mut Align64<[u32; 16]>)
fn shuffle_in(_ptr: &mut Align64<[u32; 16]>)
Shuffle data into optimal representation
Sourcefn shuffle_out(_ptr: &mut Align64<[u32; 16]>)
fn shuffle_out(_ptr: &mut Align64<[u32; 16]>)
Shuffle data out of optimal representation
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.