package conex

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

The sum type of supported digest algorithms.

val alg_to_string : alg -> string

alg_to_string alg is a string representing the digest algorithm.

val string_to_alg : string -> alg option

string_to_alg str is either Some alg or None.

type t = alg * string

A digest is a pair of digest algorithm and value.

val to_string : t -> string

to_string digest is a string representation of digest.

pp digest is a pretty printer for digest.

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, string) 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, used by Author.wire and Release.wire.