package x509

  1. Overview
  2. Docs

Types of keys

type t = [
  1. | `RSA
  2. | `ED25519
  3. | `P224
  4. | `P256
  5. | `P384
  6. | `P521
]

The polymorphic variant of key types.

val strings : (string * t) list

strings is an associative list of string and key_type pairs. Useful for cmdliner (Arg.enum).

val to_string : t -> string

to_string kt is a string representation of kt.

val of_string : string -> (t, [> Rresult.R.msg ]) Rresult.result

of_string s is Ok key_type if the string could be decoded as key_type, or an Error _.

val pp : t Fmt.t

pp ppf t is a pretty printer of t on ppf.

type signature_scheme = [
  1. | `RSA_PSS
  2. | `RSA_PKCS1
  3. | `ECDSA
  4. | `ED25519
]

The type of signature schemes.

val pp_signature_scheme : signature_scheme Fmt.t

pp_signature_scheme ppf s is a pretty-printer of s on ppf.

val supports_signature_scheme : t -> signature_scheme -> bool

supports_scheme key_type scheme is true if the signature scheme is supported with key type.

OCaml

Innovation. Community. Security.