[][src]Module accumulator::hash

This module wraps blake2b_rfc into a convenient hashing interface (GeneralHasher) and exports the generalized hash function. Also exported is hash_to_prime, which works by repeatedly hashing a value together with an incrementing nonce until the output is prime.

Modules

primality

Primality testing for U256 inputs. Use is_prob_prime unless you have a specific reason to use a lower-level test.

Structs

Blake2b

Thin wrapper around Blake2b from blake2_rfc.

Traits

GeneralHasher

Like std::hash::Hasher, but general over output type.

Functions

blake2b

Calls hash with a Blake2b hasher.

hash

Hash using the general Hasher.

hash_to_prime

Hashes t to an odd prime.