[][src]Trait storage_proofs::hasher::HashFunction

pub trait HashFunction<T: Domain>: Clone + Debug + Eq + Send + Sync + LightAlgorithm<T> {
    fn hash(data: &[u8]) -> T;
fn hash_leaf_circuit<E: JubjubEngine, CS: ConstraintSystem<E>>(
        cs: CS,
        left: &[Boolean],
        right: &[Boolean],
        height: usize,
        params: &E::Params
    ) -> Result<AllocatedNum<E>, SynthesisError>;
fn hash_circuit<E: JubjubEngine, CS: ConstraintSystem<E>>(
        cs: CS,
        bits: &[Boolean],
        params: &E::Params
    ) -> Result<AllocatedNum<E>, SynthesisError>; fn hash_leaf(data: &dyn LightHashable<Self>) -> T { ... }
fn hash_single_node(data: &dyn LightHashable<Self>) -> T { ... } }

Required methods

fn hash(data: &[u8]) -> T

fn hash_leaf_circuit<E: JubjubEngine, CS: ConstraintSystem<E>>(
    cs: CS,
    left: &[Boolean],
    right: &[Boolean],
    height: usize,
    params: &E::Params
) -> Result<AllocatedNum<E>, SynthesisError>

fn hash_circuit<E: JubjubEngine, CS: ConstraintSystem<E>>(
    cs: CS,
    bits: &[Boolean],
    params: &E::Params
) -> Result<AllocatedNum<E>, SynthesisError>

Loading content...

Provided methods

fn hash_leaf(data: &dyn LightHashable<Self>) -> T

fn hash_single_node(data: &dyn LightHashable<Self>) -> T

Loading content...

Implementors

impl HashFunction<Blake2sDomain> for Blake2sFunction[src]

impl HashFunction<PedersenDomain> for PedersenFunction[src]

impl<D: Digester> HashFunction<DigestDomain> for DigestFunction<D>[src]

Loading content...