Parameter Base__.Hash.F.1-Hash

val description : string

Name of the hash-function, e.g. "internalhash", "siphash"

type state

state is the internal hash-state used by the hash function.

val fold_int : state ‑> int ‑> state

fold_<T> state v incorporates a value v of type <T> into the hash-state, returning a modified hash-state. Implementations of the fold_<T> functions may mutate the state argument in place, and return a reference to it. Implementations of the fold_<T> functions should not allocate.

val fold_int64 : state ‑> int64 ‑> state
val fold_float : state ‑> float ‑> state
val fold_string : state ‑> string ‑> state
type seed

seed is the type used to seed the initial hash-state.

val alloc : unit ‑> state

alloc () returns a fresh uninitialized hash-state. May allocate.

val reset : ?⁠seed:seed ‑> state ‑> state

reset ?seed state initializes/resets a hash-state with the given seed, or else a default-seed. Argument state may be mutated. Should not allocate.

type hash_value

hash_value The type of hash values, returned by get_hash_value

val get_hash_value : state ‑> hash_value

get_hash_value extracts a hash-value from the hash-state.

module For_tests : sig ... end