Module Brr_webcrypto.Crypto_algo

Algorithm interface and subtypes.

Note. In algorithm objects properties with BufferSources often occur. This brings a bit of complexity for accessors so we require and return Brr.Tarray.Buffer.t for these (it also means the accessor are type unsafe on objects not generated by these modules).

type big_integer = Brr.Tarray.uint8

The type for big integers. Holds an arbitrary magnitude integer in big endian order.

type t = Crypto_key.t

The type for the Algorithm objects.

type algo = t

See t.

val v : Jstr.t -> t

v n is an algorithm object with name n.

val name : t -> Jstr.t

name a is the name of the algorithm.


val rsassa_pks1_v1_5 : Jstr.t

The name for RSASSA-PCS1-v1_5.

module Rsa_hashed_key_gen_params : sig ... end

RSA key generation parameters.

module Rsa_hashed_import_params : sig ... end

RSA key import parameters.


val rsa_pss : Jstr.t

The name for RSA-PSS.

module Rsa_pss_params : sig ... end

RSA-PSS parameters.


val rsa_oaep : Jstr.t

The name for RSA-OAEP.

module Rsa_oaep_params : sig ... end

RSA-OAEP parameters.


val ecdsa : Jstr.t

The name for ECDSA.

module Ec_key_gen_params : sig ... end

ECDSA key generation parameters.

module Ec_key_import_params : sig ... end

ECDSA key import parameters.

module Ecdsa_params : sig ... end

ECDSA signing parameters.


val ecdh : Jstr.t

The name for ECDH.

module Ecdh_key_derive_params : sig ... end

ECDH key derivation parameters.


val aes_ctr : Jstr.t

The name for AES-CTR.

module Aes_key_gen_params : sig ... end

AES key generation paramaters

module Aes_ctr_params : sig ... end

AES encryption parameters.


val aes_cbc : Jstr.t

The name for AES-CBC.

module Aes_cbc_params : sig ... end

AES CBC encryption parameters.


val aes_gcm : Jstr.t

The name for AES-GCM.

module Aes_gcm_params : sig ... end

AES GCM encryption parameters.


val aes_kw : Jstr.t

The name for AES-KW.


val hmac : Jstr.t

The name for HMAC.

module Hmac_key_gen_params : sig ... end

HMAC key generation parameters.

module Hmac_import_params : sig ... end

HMAC key import parameters.


val sha_1 : Jstr.t

The name for SHA-1.

val sha_256 : Jstr.t

The name for SHA-256.

val sha_384 : Jstr.t

The name for SHA-384.

val sha_512 : Jstr.t

The name for SHA-512.


val hkdf : Jstr.t

The name for HKDF.

module Hkdf_params : sig ... end

HKDF key derivation parameters.


val pbkdf2 : Jstr.t

The name for PBKDF2.

module Pbkdf2_params : sig ... end

PBKFD2 key derivation parameters.