package conex

  1. Overview
  2. Docs

Module Conex_resource.DigestSource

Sourcetype alg = [
  1. | `SHA256
]

The sum type of supported digest algorithms.

Sourcetype t = alg * string

A digest is a pair of digest algorithm and value.

pp digest is a pretty printer for digest.

Sourceval compare : t -> t -> int

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

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, err) 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.

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

of_string str is t or an error.

Sourceval to_string : t -> string

to_string digest is the string representing the digest.