Conex_mirage_crypto.Cval decode_priv :
string ->
Conex_resource.timestamp ->
string ->
(t, string) Stdlib.resultdecode_priv id ts data decodes the private key from data and returns a t or an error.
val bits : t -> intbits t is the number of bits in t.
val created : t -> Conex_resource.timestampcreated t is the timestamp of creation of t.
val id : t -> Conex_resource.identifierid t is the identifier of t.
val alg : t -> Conex_resource.Key.algalg t is the algorithm of t.
val generate :
alg:Conex_resource.Key.alg ->
?bits:int ->
unit ->
string * stringgenerate ~alg ~bits () generates a private key.
val pub_of_priv : t -> stringpub_of_priv priv is for RSA keys the PEM-encoded PKCS8 public key of priv, for Ed25519 keys the raw public key.
val sign : t -> string -> (string, string) Stdlib.resultsign priv data is for RSA keys the raw PSS signature of data using priv or an error, for Ed25519 keys the signature.