pub trait RoMix {
// Required methods
fn ro_mix_front_ex<S: Salsa20<Lanes = U1>>(
&mut self,
r: NonZeroU32,
cf: NonZeroU8,
);
fn ro_mix_back_ex<S: Salsa20<Lanes = U1>>(
&mut self,
r: NonZeroU32,
cf: NonZeroU8,
) -> &[u8] ⓘ;
fn ro_mix_interleaved_ex<'a, S: Salsa20<Lanes = U2>>(
&'a mut self,
front: &mut Self,
r: NonZeroU32,
cf: NonZeroU8,
) -> &'a [u8] ⓘ;
fn ro_mix_input_buffer(&mut self, r: NonZeroU32) -> &mut [u8] ⓘ;
// Provided methods
fn ro_mix_front(&mut self, r: NonZeroU32, cf: NonZeroU8) { ... }
fn ro_mix_back(&mut self, r: NonZeroU32, cf: NonZeroU8) -> &[u8] ⓘ { ... }
fn ro_mix_interleaved(
&mut self,
front: &mut Self,
r: NonZeroU32,
cf: NonZeroU8,
) -> &[u8] ⓘ { ... }
}
Expand description
Generalized RoMix interface with a runtime R value
Required Methods§
Sourcefn ro_mix_front_ex<S: Salsa20<Lanes = U1>>(
&mut self,
r: NonZeroU32,
cf: NonZeroU8,
)
fn ro_mix_front_ex<S: Salsa20<Lanes = U1>>( &mut self, r: NonZeroU32, cf: NonZeroU8, )
Perform the front part of the $RoMix$ operation
Buffer must be at least 128 * r * (n + 1) bytes long.
Sourcefn ro_mix_back_ex<S: Salsa20<Lanes = U1>>(
&mut self,
r: NonZeroU32,
cf: NonZeroU8,
) -> &[u8] ⓘ
fn ro_mix_back_ex<S: Salsa20<Lanes = U1>>( &mut self, r: NonZeroU32, cf: NonZeroU8, ) -> &[u8] ⓘ
Perform the back part of the $RoMix$ operation
Buffer must be at least 128 * r * (n + 2) bytes long.
Return: the raw salt output for the completed $RoMix$ operation
Sourcefn ro_mix_interleaved_ex<'a, S: Salsa20<Lanes = U2>>(
&'a mut self,
front: &mut Self,
r: NonZeroU32,
cf: NonZeroU8,
) -> &'a [u8] ⓘ
fn ro_mix_interleaved_ex<'a, S: Salsa20<Lanes = U2>>( &'a mut self, front: &mut Self, r: NonZeroU32, cf: NonZeroU8, ) -> &'a [u8] ⓘ
Interleave the front and back parts of the $RoMix$ operation in two independent buffers
Buffer must be at least 128 * r * (n + 2) bytes long.
Return: the raw salt output for the completed $RoMix$ operation
Sourcefn ro_mix_input_buffer(&mut self, r: NonZeroU32) -> &mut [u8] ⓘ
fn ro_mix_input_buffer(&mut self, r: NonZeroU32) -> &mut [u8] ⓘ
Convenience method to get the input buffer for the $RoMix$ operation
Always return the 128 * r bytes of the buffer
Provided Methods§
Sourcefn ro_mix_front(&mut self, r: NonZeroU32, cf: NonZeroU8)
fn ro_mix_front(&mut self, r: NonZeroU32, cf: NonZeroU8)
Perform the front part of the $RoMix$ operation
Buffer must be at least 128 * r * (n + 1) bytes long.
Sourcefn ro_mix_back(&mut self, r: NonZeroU32, cf: NonZeroU8) -> &[u8] ⓘ
fn ro_mix_back(&mut self, r: NonZeroU32, cf: NonZeroU8) -> &[u8] ⓘ
Perform the back part of the $RoMix$ operation
Buffer must be at least 128 * r * (n + 2) bytes long.
Return: the raw salt output for the completed $RoMix$ operation
Sourcefn ro_mix_interleaved(
&mut self,
front: &mut Self,
r: NonZeroU32,
cf: NonZeroU8,
) -> &[u8] ⓘ
fn ro_mix_interleaved( &mut self, front: &mut Self, r: NonZeroU32, cf: NonZeroU8, ) -> &[u8] ⓘ
Interleave the front and back parts of the $RoMix$ operation in two independent buffers
Buffer must be at least 128 * r * (n + 2) bytes long.
Return: the raw salt output for the completed $RoMix$ operation
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.