openvm_circuit::arch::hasher

Trait HasherChip

Source
pub trait HasherChip<const CHUNK: usize, F: Field>: Hasher<CHUNK, F> {
    // Required method
    fn compress_and_record(
        &mut self,
        left: &[F; CHUNK],
        right: &[F; CHUNK],
    ) -> [F; CHUNK];

    // Provided method
    fn hash_and_record(&mut self, values: &[F; CHUNK]) -> [F; CHUNK] { ... }
}

Required Methods§

Source

fn compress_and_record( &mut self, left: &[F; CHUNK], right: &[F; CHUNK], ) -> [F; CHUNK]

Stateful version of hash for recording the event in the chip.

Provided Methods§

Source

fn hash_and_record(&mut self, values: &[F; CHUNK]) -> [F; CHUNK]

Implementors§

Source§

impl<F: PrimeField32> HasherChip<PERIPHERY_POSEIDON2_CHUNK_SIZE, F> for Poseidon2PeripheryChip<F>

Source§

impl<F: PrimeField32, const SBOX_REGISTERS: usize> HasherChip<PERIPHERY_POSEIDON2_CHUNK_SIZE, F> for Poseidon2PeripheryBaseChip<F, SBOX_REGISTERS>