V0.Blake2B
include module type of struct include Mavryk_crypto.Blake2B end
type t = Mavryk_crypto.Blake2B.t
val pp : Stdlib.Format.formatter -> t -> unit
val pp_short : Stdlib.Format.formatter -> t -> unit
include Mavryk_stdlib.Compare.S with type t := t
val hash_bytes : ?key:Stdlib.Bytes.t -> Stdlib.Bytes.t list -> t
val hash_string : ?key:string -> string list -> t
hash_string ?key inputs
returns a hash.
Raises an Assert_failure
if String.length key > 64
.
val zero : t
val to_hex : t -> Mavryk_stdlib.Hex.t
val of_hex : Mavryk_stdlib.Hex.t -> t Mavryk_error_monad.Error_monad.tzresult
val of_hex_opt : Mavryk_stdlib.Hex.t -> t option
val of_hex_exn : Mavryk_stdlib.Hex.t -> t
val to_string : t -> string
val of_string : string -> t Mavryk_error_monad.Error_monad.tzresult
val of_string_opt : string -> t option
val of_string_exn : string -> t
val to_bytes : t -> Stdlib.Bytes.t
val of_bytes : Stdlib.Bytes.t -> t Mavryk_error_monad.Error_monad.tzresult
val of_bytes_opt : Stdlib.Bytes.t -> t option
val of_bytes_exn : Stdlib.Bytes.t -> t
The parameters for creating a new Hash type using Make_Blake2B
. Both name
and title
are only informative, used in error messages and serializers.
module type Name = Mavryk_crypto.Blake2B.Name
module type PrefixedName = Mavryk_crypto.Blake2B.PrefixedName
module Make_minimal = Mavryk_crypto.Blake2B.Make_minimal
Builds a new Hash type using Blake2B.
module type Register = Mavryk_crypto.Blake2B.Register
module Make (Register : sig ... end) (Name : PrefixedName) : sig ... end