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

A pointer to the created digest.

This may either be a Box or some other pointer in case the implementation wants to manage its own memory.

Required Methods

Generate a SHA from a slice of bytes.

Generate a SHA from a pair of Digests.

Generate a SHA from a slice of Fps.

Generate a SHA from a slice of Fp4s.

Generate a new digest by mixing two digests together via XOR, and storing into the first digest.

Provided Methods

Generate a SHA from a slice of words.

Implementors