package conex-nocrypto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

The abstract type t for keys

val decode_priv : string -> Conex_resource.timestamp -> string -> (t, string) result

decode_priv id ts data decodes the private key from data and returns a t or an error.

val bits : t -> int

bits t is the number of bits in t.

val created : t -> Conex_resource.timestamp

created t is the timestamp of creation of t.

id t is the identifier of t.

val generate_rsa : ?bits:int -> unit -> string * string

generate_rsa ~bits () generates an RSA private key.

val pub_of_priv_rsa : t -> string

pub_of_priv_rsa priv is the PEM-encoded PKCS8 public key of priv.

val sign_pss : t -> string -> (string, string) result

sign_pss priv data is either the raw PSS signature of data using priv or an error.

val sha256 : string -> string
OCaml

Innovation. Community. Security.