blake2

Blake2 cryptography
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library blake2
Module Blake2 . Blake2b
type t
type hash =
| Hash of Bytes.t
val init : ?key:Bytes.t -> int -> t

init ?key size is a blake2b context for hashes of size size, using key if present.

val update : t -> Bytes.t -> unit

update t buf updates t with the data in buf.

val final : t -> hash

final t is the blake2b hash of all data updated in t so far.

val direct : ?key:Bytes.t -> Bytes.t -> int -> hash

direct ?key inbuf len is the blake2b hash of length len, using key is present.