pub trait FieldHash {
type HashRepr: AsRef<[u8]>;
fn to_hash_repr(&self) -> Self::HashRepr;
fn digest_update<D: Digest>(&self, d: &mut D) { ... }
fn transcript_update(&self, t: &mut Transcript, l: &'static [u8]) { ... }
}
Expand description
Trait for a field element that can be hashed via digest::Digest
Associated Types
Required methods
fn to_hash_repr(&self) -> Self::HashRepr
fn to_hash_repr(&self) -> Self::HashRepr
Convert Self
into a HashRepr
for hashing
Provided methods
fn digest_update<D: Digest>(&self, d: &mut D)
fn digest_update<D: Digest>(&self, d: &mut D)
Update the digest d
with the HashRepr
of Self
fn transcript_update(&self, t: &mut Transcript, l: &'static [u8])
fn transcript_update(&self, t: &mut Transcript, l: &'static [u8])
Update the merlin::Transcript t
with the HashRepr
of Self
with label l