pub struct FixedLenPoseidon2Hash<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize>where
F: PrimeField + Unit,
S: Sponge<U = F> + Poseidon2Sponge,{ /* private fields */ }
Expand description
Sponge-based CRHF where the Sponge uses Poseidon2 permutation
Input length is fixed: the actual input can be shorter, but will internally
be zero-padded to INPUT_SIZE
Example:
FixedLenPoseidon2Hash<ark_bn254::Fr, Poseidon2SpongeStateBnN3R1, 6, 2>
Trait Implementations§
Source§impl<F, S, const IN: usize, const OUT: usize> CRHF for FixedLenPoseidon2Hash<F, S, IN, OUT>where
F: PrimeField + Unit,
S: Sponge<U = F> + Poseidon2Sponge,
impl<F, S, const IN: usize, const OUT: usize> CRHF for FixedLenPoseidon2Hash<F, S, IN, OUT>where
F: PrimeField + Unit,
S: Sponge<U = F> + Poseidon2Sponge,
Source§impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> Clone for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>
impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> Clone for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>
Source§fn clone(&self) -> FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>
fn clone(&self) -> FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>
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, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> Freeze for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>
impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> RefUnwindSafe for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>where
F: RefUnwindSafe,
S: RefUnwindSafe,
impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> Send for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>where
S: Send,
impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> Sync for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>where
S: Sync,
impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> Unpin for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>
impl<F, S, const INPUT_SIZE: usize, const OUTPUT_SIZE: usize> UnwindSafe for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, OUTPUT_SIZE>where
F: UnwindSafe,
S: 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