pub struct RescueCRHF<F: RescueParameter> { /* private fields */ }
Expand description
CRHF
Implementations§
Source§impl<F: RescueParameter> RescueCRHF<F>
impl<F: RescueParameter> RescueCRHF<F>
Sourcepub fn sponge_with_bit_padding(input: &[F], num_outputs: usize) -> Vec<F>
pub fn sponge_with_bit_padding(input: &[F], num_outputs: usize) -> Vec<F>
Sponge hashing based on rescue permutation for RATE 3. It allows
unrestricted variable length input and returns a vector of
num_outputs
elements.
we use “bit padding”-style where “1” is always appended, then as many “0” as required are added for the overall length to be a multiple of RATE
Sourcepub fn sponge_with_zero_padding(input: &[F], num_outputs: usize) -> Vec<F>
pub fn sponge_with_zero_padding(input: &[F], num_outputs: usize) -> Vec<F>
Similar to RescueCRHF::sponge_with_bit_padding
except we use “zero
padding” where as many “0” as required are added for the
overall length to be a multiple of RATE.
Sourcepub fn sponge_no_padding(
input: &[F],
num_output: usize,
) -> Result<Vec<F>, RescueError>
pub fn sponge_no_padding( input: &[F], num_output: usize, ) -> Result<Vec<F>, RescueError>
Sponge hashing based on rescue permutation for RATE 3 and CAPACITY 1. It
allows inputs with length that is a multiple of CRHF_RATE
and
returns a vector of num_outputs
elements.
Trait Implementations§
Source§impl<F: Clone + RescueParameter> Clone for RescueCRHF<F>
impl<F: Clone + RescueParameter> Clone for RescueCRHF<F>
Source§fn clone(&self) -> RescueCRHF<F>
fn clone(&self) -> RescueCRHF<F>
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> Freeze for RescueCRHF<F>where
F: Freeze,
impl<F> RefUnwindSafe for RescueCRHF<F>where
F: RefUnwindSafe,
impl<F> Send for RescueCRHF<F>
impl<F> Sync for RescueCRHF<F>
impl<F> Unpin for RescueCRHF<F>where
F: Unpin,
impl<F> UnwindSafe for RescueCRHF<F>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