Module Signature.Algorithm

Signature algorithms per RFC 9421 Section 3.3.

type t = [
  1. | `Rsa_pss_sha512
    (*

    RSASSA-PSS using SHA-512

    *)
  2. | `Rsa_v1_5_sha256
    (*

    RSASSA-PKCS1-v1_5 using SHA-256

    *)
  3. | `Hmac_sha256
    (*

    HMAC using SHA-256

    *)
  4. | `Ecdsa_p256_sha256
    (*

    ECDSA using P-256 curve with SHA-256

    *)
  5. | `Ecdsa_p384_sha384
    (*

    ECDSA using P-384 curve with SHA-384

    *)
  6. | `Ed25519
    (*

    EdDSA using curve25519

    *)
]
val to_string : t -> string

to_string alg returns the algorithm identifier string.

val of_string : string -> t option

of_string s parses an algorithm identifier string.

val of_string_exn : string -> t

of_string_exn s parses an algorithm identifier or raises Invalid_argument.