Module Conex_mirage_crypto.C
val decode_priv : string -> Conex_resource.timestamp -> string -> (t, string) Stdlib.result
decode_priv id ts data
decodes the private key fromdata
and returns at
or an error.
val bits : t -> int
bits t
is the number of bits int
.
val created : t -> Conex_resource.timestamp
created t
is the timestamp of creation oft
.
val id : t -> Conex_resource.identifier
id t
is the identifier oft
.
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 ofpriv
.
val sign_pss : t -> string -> (string, string) Stdlib.result
sign_pss priv data
is either the raw PSS signature ofdata
usingpriv
or an error.