aztec-nr - std::hash

Trait Hasher

pub trait Hasher {
    // Required methods
    pub fn finish(self) -> Field;
    pub fn write(&mut self: &mut Self, input: Field);

    // Provided methods
    pub fn finish_ref(&mut self: &Self) -> Field { ... }
}

Required methods

pub fn finish(self) -> Field pub fn write(&mut self: &mut Self, input: Field)

Provided methods

pub fn finish_ref(&mut self: &Self) -> Field

Returns the hash value without consuming the hasher. Override this for more efficient implementations that avoid copying. TODO: deprecate finish() and replace it

Implementors

impl Hasher for MaxHasher

impl Hasher for Poseidon2Hasher

impl Hasher for Poseidon2Hasher

impl Hasher for PoseidonHasher