[][src]Trait snarkos_models::algorithms::commitment::CommitmentScheme

pub trait CommitmentScheme: Sized + Clone + From<Self::Parameters> {
    type Output: Clone + Debug + Default + Eq + Hash + ToBytes + FromBytes;
    type Parameters: Clone + Debug + Eq + ToBytes + FromBytes;
    type Randomness: Clone + Debug + Default + Eq + UniformRand + ToBytes + FromBytes;
    fn setup<R: Rng>(r: &mut R) -> Self;
fn commit(
        &self,
        input: &[u8],
        randomness: &Self::Randomness
    ) -> Result<Self::Output, CommitmentError>;
fn parameters(&self) -> &Self::Parameters; }

Associated Types

Loading content...

Required methods

fn setup<R: Rng>(r: &mut R) -> Self

fn commit(
    &self,
    input: &[u8],
    randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>

fn parameters(&self) -> &Self::Parameters

Loading content...

Implementors

Loading content...