dns

An opinionated Domain Name System (DNS) library
Library dns
Module Dns . Sshfp
type algorithm =
| Rsa
| Dsa
| Ecdsa
| Ed25519
| Unknown of int(*

The type of supported algorithms.

*)
val algorithm_to_int : algorithm -> int

algorithm_to_int a is the 8 bit integer representation of algorithm a.

val int_to_algorithm : int -> algorithm

int_to_algorithm i decodes i to the algorithm constructor.

  • raises Invalid_argument

    if i does not fit in one octet.

val pp_algorithm : algorithm Fmt.t

pp_algorithm ppf a pretty-prints the algorithm a on ppf.

type typ =
| SHA1
| SHA256
| Unknown of int(*

The type of supported SSH fingerprint types.

*)
val typ_to_int : typ -> int

typ_to_int t is the 8 bit integer representation of typ t.

val int_to_typ : int -> typ

int_to_typ i decodes i to the typ constructor.

  • raises Invalid_argument

    if i does not fit in one octet.

val pp_typ : typ Fmt.t

pp_typ ppf t pretty-prints the typ t on ppf.

type t = {
algorithm : algorithm;
typ : typ;
fingerprint : Cstruct.t;
}

The type of a SSH fingerprint record, consisting of algorithm, typ, and actual fingerprint.

val pp : t Fmt.t

pp ppf t pretty-prints the SSH fingerprint record t on ppf.

val compare : t -> t -> int

compare a b compares the SSH fingerprint record a with b by comparing the individual fields in order.