package conex

  1. Overview
  2. Docs
type alg = [
  1. | `SHA256
]

The sum type of supported digest algorithms.

type t = alg * string

A digest is a pair of digest algorithm and value.

pp digest is a pretty printer for digest.

val compare : t -> t -> int

compare a b compares a and b, returns 0 if equal, -1 if smaller, 1 if bigger.

val equal : t -> t -> bool

equal a b is true when a and b use the same algorithm type, and have the same value.

val of_wire : Wire.s -> (t, err) result

of_wire w converts w to a digest or error.

val wire_raw : t -> Wire.s

wire_raw t is the wire representation of t.

val of_string : string -> (t, err) result

of_string str is t or an error.

val to_string : t -> string

to_string digest is the string representing the digest.

OCaml

Innovation. Community. Security.