package awa

  1. Overview
  2. Docs
type priv =
  1. | Rsa_priv of Mirage_crypto_pk.Rsa.priv
  2. | Ed25519_priv of Mirage_crypto_ec.Ed25519.priv
type pub =
  1. | Rsa_pub of Mirage_crypto_pk.Rsa.pub
  2. | Ed25519_pub of Mirage_crypto_ec.Ed25519.pub
val pub_of_priv : priv -> pub
val sexp_of_pub : pub -> Sexplib.Sexp.t
val pub_of_sexp : 'a -> 'b
val sshname : pub -> string
type alg =
  1. | Rsa_sha1
  2. | Rsa_sha256
  3. | Rsa_sha512
  4. | Ed25519
val hash : alg -> [> `SHA1 | `SHA256 | `SHA512 ]
val alg_of_string : string -> (alg, string) Stdlib.result
val alg_to_string : alg -> string
val alg_of_sexp : Sexplib.Sexp.t -> alg
val sexp_of_alg : alg -> Sexplib.Sexp.t
val preferred_algs : alg list
val algs_of_typ : [< `Ed25519 | `Rsa ] -> alg list
val priv_to_typ : priv -> [> `Ed25519 | `Rsa ]
val alg_matches : [< `Ed25519 | `Rsa ] -> alg -> bool
val signature_equal : Cstruct.t -> Cstruct.t -> bool
val sign : alg -> priv -> Cstruct.t -> Cstruct.t
val verify : alg -> pub -> unsigned:Cstruct.t -> signed:Cstruct.t -> bool
OCaml

Innovation. Community. Security.