package conex

  1. Overview
  2. Docs

Module Conex_resource.DigestSource

Sourcetype alg = [
  1. | `SHA256
]

The sum type of supported digest algorithms.

Sourceval alg_to_string : alg -> string

alg_to_string alg is a string representing the digest algorithm.

Sourceval string_to_alg : string -> alg option

string_to_alg str is either Some alg or None.

Sourcetype t = alg * string

A digest is a pair of digest algorithm and value.

Sourceval to_string : t -> string

to_string digest is a string representation of digest.

pp digest is a pretty printer for digest.

Sourceval equal : t -> t -> bool

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

Sourceval of_wire : Wire.s -> (t, string) result

of_wire w converts w to a digest or error.

Sourceval wire_raw : t -> Wire.s

wire_raw t is the wire representation of t, used by Author.wire and Release.wire.