pub struct FixedLengthRescueCRHF<F: RescueParameter, const INPUT_LEN: usize, const OUTPUT_LEN: usize>(/* private fields */);
Expand description
A rescue-sponge-based CRHF with fixed-input size (if not multiple of 3 will get auto-padded) and variable-output size
Trait Implementations§
Source§impl<F: RescueParameter, const INPUT_LEN: usize, const OUTPUT_LEN: usize> CRHF for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
impl<F: RescueParameter, const INPUT_LEN: usize, const OUTPUT_LEN: usize> CRHF for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
Source§fn evaluate<T: Borrow<Self::Input>>(
input: T,
) -> Result<Self::Output, Self::Error>
fn evaluate<T: Borrow<Self::Input>>( input: T, ) -> Result<Self::Output, Self::Error>
§Padding
if input
length is not a multiple of CRHF_RATE
, then it will be
padded. By default, we use “zero padding”-style where as many “0” as
required are added.
Source§type Input = [F; INPUT_LEN]
type Input = [F; INPUT_LEN]
Input to the CRHF
Source§type Output = [F; OUTPUT_LEN]
type Output = [F; OUTPUT_LEN]
Output of the CRHF
Source§type Error = RescueError
type Error = RescueError
Error type
Source§impl<F: Clone + RescueParameter, const INPUT_LEN: usize, const OUTPUT_LEN: usize> Clone for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
impl<F: Clone + RescueParameter, const INPUT_LEN: usize, const OUTPUT_LEN: usize> Clone for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
Source§fn clone(&self) -> FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
fn clone(&self) -> FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<F, const INPUT_LEN: usize, const OUTPUT_LEN: usize> Freeze for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
impl<F, const INPUT_LEN: usize, const OUTPUT_LEN: usize> RefUnwindSafe for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>where
F: RefUnwindSafe,
impl<F, const INPUT_LEN: usize, const OUTPUT_LEN: usize> Send for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
impl<F, const INPUT_LEN: usize, const OUTPUT_LEN: usize> Sync for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>
impl<F, const INPUT_LEN: usize, const OUTPUT_LEN: usize> Unpin for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>where
F: Unpin,
impl<F, const INPUT_LEN: usize, const OUTPUT_LEN: usize> UnwindSafe for FixedLengthRescueCRHF<F, INPUT_LEN, OUTPUT_LEN>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more