module type XXHASH =sig..end
type hash
type state
val hash : ?seed:hash -> string -> hashhash ~seed input returns the hash of input. This is equivalent to
let state = create () in
reset ~seed state;
update state input;
let hash = digest state in
free state;
hashval create : unit -> statecreate () returns an uninitialized state.val reset : ?seed:hash -> state -> unitreset ~seed state resets state with an optional seed.val update : state -> string -> unitupdate state input adds input to state.val digest : state -> hashdigest state returns the hash all input added to state.val free : state -> unitfree state releases the memory used by state.val with_state : ?seed:hash ->
(state -> unit) -> hashwith_state ~seed f returns the hash of all input added to state by f.
with_state (fun state -> update state input) is equivalent to hash input.