exception
Invalid_key
The exception raised when a key can not be decoded from the given IRI.
module FragmentGraph : Rdf_fragment_graph.S
val generate_secret_key : unit -> SecretKey.t
generate_secret_key ()
generates a new secret key (using Crypto.random_string
) and returns it as iri.
val public_key : SecretKey.t -> PublicKey.t
public_key secret_key
returns the associated public key of secret_key
.
val signature_value : secret_key:SecretKey.t -> Rdf.Iri.t -> Rdf.Literal.t
signature_exn ~secret_key message
creates a RDF Signify signature of message
using secret_key
.
val signature : secret_key:SecretKey.t -> Rdf.Iri.t -> FragmentGraph.t
signature_exn ~secret_key message
creates a RDF Signify signature of message
using secret_key
.
val verify : public_key:PublicKey.t -> signature:Rdf.Term.t -> Rdf.Term.t -> bool
verify ~public_key ~signature message
verifies if signature
of message
is valid for public_key
.