Struct starknet_crypto::PoseidonHasher
source · pub struct PoseidonHasher { /* private fields */ }
Expand description
A hasher for Starknet Poseidon hash.
Using this hasher is the same as calling poseidon_hash_many.
Implementations§
source§impl PoseidonHasher
impl PoseidonHasher
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new PoseidonHasher.
sourcepub fn update(&mut self, msg: FieldElement)
pub fn update(&mut self, msg: FieldElement)
Absorbs message into the hash.
sourcepub fn finalize(self) -> FieldElement
pub fn finalize(self) -> FieldElement
Finishes and returns hash.
Trait Implementations§
source§impl Debug for PoseidonHasher
impl Debug for PoseidonHasher
source§impl Default for PoseidonHasher
impl Default for PoseidonHasher
source§fn default() -> PoseidonHasher
fn default() -> PoseidonHasher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PoseidonHasher
impl RefUnwindSafe for PoseidonHasher
impl Send for PoseidonHasher
impl Sync for PoseidonHasher
impl Unpin for PoseidonHasher
impl UnwindSafe for PoseidonHasher
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