pub struct PoseidonGrainLFSR {
pub field_size_in_bits: u64,
pub state: [bool; 80],
pub head: usize,
}
Fields§
§field_size_in_bits: u64
§state: [bool; 80]
§head: usize
Implementations§
Source§impl PoseidonGrainLFSR
impl PoseidonGrainLFSR
pub fn new( is_sbox_an_inverse: bool, field_size_in_bits: u64, state_len: u64, num_full_rounds: u64, num_partial_rounds: u64, ) -> Self
pub fn get_field_elements_rejection_sampling<F: PrimeField>( &mut self, num_elements: usize, ) -> Result<Vec<F>>
pub fn get_field_elements_mod_p<F: PrimeField>( &mut self, num_elems: usize, ) -> Result<Vec<F>>
Auto Trait Implementations§
impl Freeze for PoseidonGrainLFSR
impl RefUnwindSafe for PoseidonGrainLFSR
impl Send for PoseidonGrainLFSR
impl Sync for PoseidonGrainLFSR
impl Unpin for PoseidonGrainLFSR
impl UnwindSafe for PoseidonGrainLFSR
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> 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