Trait ark_ff::fields::field_hashers::HashToField
source · pub trait HashToField<F: Field>: Sized {
// Required methods
fn new(domain: &[u8]) -> Self;
fn hash_to_field(&self, msg: &[u8], count: usize) -> Vec<F>;
}
Expand description
Trait for hashing messages to field elements.
Required Methods§
sourcefn new(domain: &[u8]) -> Self
fn new(domain: &[u8]) -> Self
Initialises a new hash-to-field helper struct.
Arguments
domain
- bytes that get concatenated with themsg
during hashing, in order to separate potentially interfering instantiations of the hasher.
sourcefn hash_to_field(&self, msg: &[u8], count: usize) -> Vec<F>
fn hash_to_field(&self, msg: &[u8], count: usize) -> Vec<F>
Hash an arbitrary msg
to #count
elements from field F
.