package tezos-dac-lib

  1. Overview
  2. Docs

The encoding of reveal hashes.

val equal : hash -> hash -> bool

equal h1 h2 determines if h1 and h2 are the same hash.

val hash_string : scheme:supported_hashes -> ?key:string -> string list -> hash

hash_string ~scheme ?key strings hashes strings using the supported hashing scheme given in input.

val hash_bytes : scheme:supported_hashes -> ?key:bytes -> bytes list -> hash

hash_bytes ~scheme ?key strings hashes bytes using the supported hashing scheme given in input.

val scheme_of_hash : hash -> supported_hashes

scheme_of_hash hash returns the supported hashing scheme that was used to obtain hash.

val of_hex : string -> hash option

of_hex hex decodes a hex into hash.

val to_hex : hash -> string

to_hex hash encodes hash into hex.

val size : scheme:supported_hashes -> int

size ~scheme returns the size of reveal hashes using the scheme specified in input.

OCaml

Innovation. Community. Security.