package dns
Library
Module
Module type
Parameter
Class
Class type
DNS keys
A DNS key record (DNSKEY) specifies flags, algorithm, and key data.
val int_to_algorithm : int -> algorithm
int_to_algorithm i
decodes i
to an algorithm
.
val algorithm_to_int : algorithm -> int
algorithm_to_int a
encodes a
to an integer.
val pp_algorithm : algorithm Fmt.t
pp_algorithm ppf a
pretty-prints the algorithm.
The type of a DNSKEY record.
val pp : t Fmt.t
pp ppf t
pretty-prints the DNSKEY.
val of_string : string -> (t, [> `Msg of string ]) Stdlib.result
of_string str
attempts to parse str
to a dnskey. The colon character (:
) is used as separator, supported format is: algo:keydata
where keydata is a base64 string.
val name_key_of_string :
string ->
([ `raw ] Domain_name.t * t, [> `Msg of string ]) Stdlib.result
name_key_of_string str
attempts to parse str
to a domain name and a dnskey. The colon character (:
) is used as separator.
val pp_name_key : ([ `raw ] Domain_name.t * t) Fmt.t
pp_name_key (name, key)
pretty-prints the dnskey and name pair.
val digest_prep : [ `raw ] Domain_name.t -> t -> string
digest_prep name key
encodes name and key into a buffer, as preparation for computing its digest (for DS records).
val key_tag : t -> int
key_tag key
computes the key tag (RFC 4034, Appendix B).