Trait ark_ec::hashing::HashToCurve
source · pub trait HashToCurve<T: CurveGroup>: Sized {
// Required methods
fn new(domain: &[u8]) -> Result<Self, HashToCurveError>;
fn hash(&self, message: &[u8]) -> Result<T::Affine, HashToCurveError>;
}
Expand description
Trait for hashing arbitrary data to a group element on an elliptic curve
Required Methods§
sourcefn new(domain: &[u8]) -> Result<Self, HashToCurveError>
fn new(domain: &[u8]) -> Result<Self, HashToCurveError>
Create a new hash to curve instance, with a given domain.