Module Brr_webcrypto.Crypto_key

CryptoKey interface.

module Type : sig ... end

The key type enumeration.

module Usage : sig ... end

The key usage enumeration.

module Format : sig ... end

The key format enumeration.

type algo

Forward declaration of Crypto_algo.t

type t

The type for CryptoKey object.

val type' : t -> Type.t

type' k is the type of the key.

val extractable : t -> bool

extractable k indicates if k can be extracted with Subtle_crypto.export_key or Subtle_crypto.wrap_key.

val algorithm : t -> algo

algorithm k describes the algorithm for which this can be used an associated parameters.

val usages : t -> Usage.t list

uages k indicates what can be done with the key.

Key pairs

type pair

The type for CryptoKeyPair objects.

val public : pair -> t

public pair is the public key of pair.

val private' : pair -> t

private' pair is the private key of pair.