pub struct Griffin;Expand description
Griffin implements the Griffin permutation and Griffin hash.
Implementations§
Source§impl Griffin
impl Griffin
Sourcepub fn permute<F: PrimeField>(params: &GriffinParams<F>, input: &mut [F])
pub fn permute<F: PrimeField>(params: &GriffinParams<F>, input: &mut [F])
Griffin::permute applies the Griffin permutation to the given input
state input in place under parameters params.
Sourcepub fn hash<F: PrimeField>(params: &GriffinParams<F>, message: &[F]) -> F
pub fn hash<F: PrimeField>(params: &GriffinParams<F>, message: &[F]) -> F
Griffin::hash implements the Griffin hash function based on the
sponge construction, which produces a single field element as the digest
of the given message message under parameters params.
Auto Trait Implementations§
impl Freeze for Griffin
impl RefUnwindSafe for Griffin
impl Send for Griffin
impl Sync for Griffin
impl Unpin for Griffin
impl UnsafeUnpin for Griffin
impl UnwindSafe for Griffin
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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