Trait risc0_zkp_core::sha::Sha
source · [−]pub trait Sha: Clone + Debug {
type DigestPtr: Deref<Target = Digest> + Debug;
fn hash_bytes(&self, bytes: &[u8]) -> Self::DigestPtr;
fn hash_pair(&self, a: &Digest, b: &Digest) -> Self::DigestPtr;
fn hash_fps(&self, fps: &[Fp]) -> Self::DigestPtr;
fn hash_fp4s(&self, fp4s: &[Fp4]) -> Self::DigestPtr;
fn mix(&self, pool: &mut Self::DigestPtr, val: &Digest);
fn hash_words(&self, words: &[u32]) -> Self::DigestPtr { ... }
}
Expand description
An implementation that provides SHA-256 hashing services.
Required Associated Types
Required Methods
fn hash_bytes(&self, bytes: &[u8]) -> Self::DigestPtr
fn hash_bytes(&self, bytes: &[u8]) -> Self::DigestPtr
Generate a SHA from a slice of bytes.
Generate a SHA from a pair of Digests.
Provided Methods
fn hash_words(&self, words: &[u32]) -> Self::DigestPtr
fn hash_words(&self, words: &[u32]) -> Self::DigestPtr
Generate a SHA from a slice of words.