HashCPU

Trait HashCPU 

pub trait HashCPU<Input, Output>: Clone + Debug {
    // Required method
    fn hash(inputs: &[Input]) -> Output;
}
Expand description

The set of off-circuit instructions for hashing operations.

Required Methods§

fn hash(inputs: &[Input]) -> Output

Hash the given input into the designated output type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<F> HashCPU<u8, [u8; 32]> for Sha256Chip<F>
where F: PrimeField,

§

impl<F> HashCPU<u8, [u8; 32]> for VarLenSha256Gadget<F>
where F: PrimeField,

§

impl<F> HashCPU<u8, [u8; 64]> for Sha512Chip<F>
where F: PrimeField,

§

impl<F> HashCPU<F, F> for PoseidonChip<F>
where F: PoseidonField,

§

impl<F> HashCPU<F, F> for VarLenPoseidonGadget<F>
where F: PoseidonField,