use anyhow::Result;
pub trait Commit {
type Input;
type Output;
type Randomizer;
fn commit(&self, input: &[Self::Input], randomizer: &Self::Randomizer) -> Result<Self::Output>;
}
pub trait CommitUncompressed {
type Input;
type Output;
type Randomizer;
fn commit_uncompressed(&self, input: &[Self::Input], randomizer: &Self::Randomizer) -> Result<Self::Output>;
}
pub trait Hash {
type Input;
type Output;
fn hash(&self, input: &[Self::Input]) -> Result<Self::Output>;
}
pub trait HashMany {
type Input;
type Output;
fn hash_many(&self, input: &[Self::Input], num_outputs: u16) -> Vec<Self::Output>;
}
pub trait HashToGroup {
type Input;
type Output;
fn hash_to_group(&self, input: &[Self::Input]) -> Result<Self::Output>;
}
pub trait HashToScalar {
type Input;
type Output;
fn hash_to_scalar(&self, input: &[Self::Input]) -> Result<Self::Output>;
}
pub trait HashUncompressed {
type Input;
type Output;
fn hash_uncompressed(&self, input: &[Self::Input]) -> Result<Self::Output>;
}
pub trait PRF {
type Seed;
type Input;
type Output;
fn prf(&self, seed: &Self::Seed, input: &[Self::Input]) -> Result<Self::Output>;
}