Trait snarkvm_algorithms::traits::commitment::CommitmentScheme
source · [−]pub trait CommitmentScheme: ToBytes + FromBytes + Sized + Clone + From<Self::Parameters> {
type Output: Clone + Debug + Default + Eq + Hash + ToBytes + FromBytes + Sync + Send;
type Parameters: Clone + Debug + Eq;
type Randomness: Clone + Debug + Default + Eq + UniformRand + ToBytes + FromBytes + Sync + Send;
fn setup(message: &str) -> Self;
fn commit(
&self,
input: &[u8],
randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>;
fn parameters(&self) -> Self::Parameters;
}