diff --git a/enums/aes_shared.Alg.Mode.html b/enums/aes_shared.Alg.Mode.html index 5aa7964f..70f84679 100644 --- a/enums/aes_shared.Alg.Mode.html +++ b/enums/aes_shared.Alg.Mode.html @@ -1 +1 @@ -
Returns a section of an ArrayBuffer.
diff --git a/interfaces/sha_shared.Sha256ArrayBuffer.html b/interfaces/sha_shared.Sha256ArrayBuffer.html index 7e4b095d..403f5360 100644 --- a/interfaces/sha_shared.Sha256ArrayBuffer.html +++ b/interfaces/sha_shared.Sha256ArrayBuffer.html @@ -1,4 +1,4 @@ -Returns a section of an ArrayBuffer.
diff --git a/interfaces/sha_shared.Sha384ArrayBuffer.html b/interfaces/sha_shared.Sha384ArrayBuffer.html index c38fd0e6..e3cb5b80 100644 --- a/interfaces/sha_shared.Sha384ArrayBuffer.html +++ b/interfaces/sha_shared.Sha384ArrayBuffer.html @@ -1,4 +1,4 @@ -Returns a section of an ArrayBuffer.
diff --git a/interfaces/sha_shared.Sha512ArrayBuffer.html b/interfaces/sha_shared.Sha512ArrayBuffer.html index 86fc7606..edc67e7c 100644 --- a/interfaces/sha_shared.Sha512ArrayBuffer.html +++ b/interfaces/sha_shared.Sha512ArrayBuffer.html @@ -1,4 +1,4 @@ -Returns a section of an ArrayBuffer.
diff --git a/modules/aes.html b/modules/aes.html index fa61074f..3cc4edcd 100644 --- a/modules/aes.html +++ b/modules/aes.html @@ -1,3 +1,3 @@ -All AES related modes and functions
-Code related to AES_CBC mode
-Decrypt data with an AES_CBC key
example
const plaintextBytes = await AES_CBC.decrypt(
{ iv },
key.self,
ciphertextBytes
);
example
const plaintextBytes = await key.decrypt(
{ iv },
ciphertextBytes
);
-Encrypt payload with an AES_CBC key
example
const key = await AES_CBC.generateKey();
const iv = await IV.generate();
const ciphertextBytes = await AES_CBC.encrypt(
{ iv },
key.self,
new TextEncoder().encode('message')
);
example
const key = await AES_CBC.generateKey();
const iv = await IV.generate();
const ciphertextBytes = await key.encrypt(
{ iv },
new TextEncoder().encode('message')
);
-Export an AES_CBC key
example
const key = await AES_CBC.generateKey();
const jwk = await AES_CBC.exportKey("jwk", key.self);
example
const key = await AES_CBC.generateKey();
const jwk = await key.exportKey("jwk");
-Generate a new AES_CBC key
example
const key = await AES_CBC.generateKey();
Import an AES_CBC key
example
const jwk = await AES_CBC.importKey("jwk", jwk, {
length: 256,
});
-Unwrap a wrapped key using the key encryption key
example
const wrappedKey = await AES_CBC.wrapKey("raw", dek.self, kek.self, {
iv,
});
const unwrappedKey = await AES_CBC.unwrapKey(
"raw",
wrappedKey,
{ name: Alg.Mode.AES_CBC },
kek.self,
{ iv }
);
example
const wrappedKey = await AES_CBC.wrapKey("raw", dek.self, kek.self, {
iv,
});
const unwrappedKey = await kek.unwrapKey(
"raw",
wrappedKey,
{ name: Alg.Mode.AES_CBC },
{ iv }
);
-Wrap another key with an AES_CBC key
example
const kek = await AES_CBC.generateKey({ length: 256 }, true, [
"wrapKey",
"unwrapKey",
]);
const dek: AesCbcCryptoKey = await AES_CBC.generateKey({
length: 256,
});
const iv = await IV.generate();
const wrappedKey = await AES_CBC.wrapKey("raw", dek, kek, {
iv,
});
diff --git a/modules/aes_aes_ctr.html b/modules/aes_aes_ctr.html
index 5a6590a2..fd2fd45b 100644
--- a/modules/aes_aes_ctr.html
+++ b/modules/aes_aes_ctr.html
@@ -1,45 +1,45 @@
-Code related to AES_CTR mode
-Decrypt with an AES_CTR key
example
const data = await AES_CTR.decrypt({length, counter}, key.self, data);
example
const data = await key.decrypt({length, counter}, data);
-Encrypt with an AES_CTR key
example
const key = await AES_CTR.generateKey();
const message = new TextEncoder().encode("a message");
const length = 8;
const counter = await AES_CTR.generateCounter(length);
const data = await AES_CTR.encrypt({length, counter}, key.self, message);
example
const key = await AES_CTR.generateKey();
const message = new TextEncoder().encode("a message");
const length = 8;
const counter = await AES_CTR.generateCounter(length);
const data = await key.encrypt({length, counter}, message);
-Export an AES_CTR key into the specified format
example
const key = await AES_CTR.generateKey();
const jwk = await AES_CTR.exportKey("jwk", key.self);
example
const key = await AES_CTR.generateKey();
const jwk = await key.exportKey("jwk");
-Generate a new AES_CTR key
example
const key = await AES_CTR.generateKey();
Import an AES_CTR key from the specified format
example
const key = await AES_CTR.importKey("jwk", jwk, { length: 256 });
-Unwrap a wrapped key using the key encryption key
example
const dek = await AES_CTR.unwrapKey("raw", wrappedKey, {name: "AES_CTR"}, kek.self, {length, counter});
example
const dek = await kek.unwrapKey("raw", wrappedKey, {name: "AES_CTR"}, {length, counter});
-Wrap another key with an AES_CTR key
example
const kek = await AES_CTR.generateKey({length: 256}, true, ['wrapKey', 'unwrapKey']);
const dek = await AES_CTR.generateKey();
const length = 8;
const counter = await AES_CTR.generateCounter(length);
const wrappedKey = await AES_CTR.wrapKey("raw", dek.self, kek.self, {length, counter});
diff --git a/modules/aes_aes_gcm.html b/modules/aes_aes_gcm.html
index a60c9caf..a7f24d11 100644
--- a/modules/aes_aes_gcm.html
+++ b/modules/aes_aes_gcm.html
@@ -1,40 +1,40 @@
-Code related to AES_GCM mode
-Decrypt with an AES_GCM key
example
const key = await AES_GCM.generateKey();
const data = await AES_GCM.decrypt({iv}, key.self, data);
example
const key = await AES_GCM.generateKey();
const data = await key.decrypt({iv}, data);
-Encrypt with an AES_GCM key
example
const iv = await Random.IV.generate();
const key = await AES_GCM.generateKey();
const message = new TextEncoder().encode("a message");
const data = await AES_GCM.encrypt({iv}, key.self, message);
example
const iv = await Random.IV.generate();
const key = await AES_GCM.generateKey();
const message = new TextEncoder().encode("a message");
const data = await key.encrypt({iv}, message);
-Export an AES_GCM key into the specified format
example
const key = await AES_GCM.generateKey();
const jwk = await AES_GCM.exportKey("jwk", key.self);
example
const key = await AES_GCM.generateKey();
const jwk = await key.exportKey("jwk");
-Generate a new AES_GCM key
example
const key = await AES_GCM.generateKey();
Import an AES_GCM key from the specified format
example
const key = await AES_GCM.importKey("jwk", jwk, { length: 256 });
-Unwrap a wrapped key using the key encryption key
example
const dek = await AES_GCM.unwrapKey("raw", wrappedKey, {name: "AES_GCM"}, kek, {iv});
example
const dek = await kek.unwrapKey("raw", wrappedKey, {name: "AES_GCM"}, {iv});
-Wrap another key with an AES_GCM key
example
const iv = await Random.IV.generate();
const kek = await AES_GCM.generateKey({length: 256}, true, ['wrapKey', 'unwrapKey']);
const dek = await AES_GCM.generateKey();
const wrappedKey = await AES_GCM.wrapKey("raw", dek.self, kek.self, {iv});
diff --git a/modules/aes_aes_kw.html b/modules/aes_aes_kw.html
index 40ead7a0..a625013a 100644
--- a/modules/aes_aes_kw.html
+++ b/modules/aes_aes_kw.html
@@ -1,28 +1,28 @@
-Code related to AES_KW mode
-Export an AES_KW key into the specified format
example
const jwk = await AES_KW.exportKey("jwk", key.self);
example
const jwk = await key.exportKey("jwk");
-Generate a new AES_KW key
example
const key = await AES_KW.generateKey();
Import an AES_KW key from the specified format
example
const key = await AES_KW.importKey("jwk", jwk);
-Unwrap a wrapped key using the key encryption key
example
const dek = await AES_KW.unwrapKey("raw", wrappedKey, {name: "AES_GCM"}, kek.self);
example
const dek = await kek.unwrapKey("raw", wrappedKey, {name: "AES_GCM"});
-Wrap another key with an AES_KW key
example
const kek = await AES_KW.generateKey({length: 256}, true, ['wrapKey', 'unwrapKey']);
const dek = await AES_GCM.generateKey();
const wrappedKey = await AES_KW.wrapKey("raw", dek.self, kek.self);
diff --git a/modules/aes_shared.AesShared.html b/modules/aes_shared.AesShared.html
index 19742f6e..d73f7559 100644
--- a/modules/aes_shared.AesShared.html
+++ b/modules/aes_shared.AesShared.html
@@ -1 +1 @@
-Shared code for AES
-All elliptic curve algorithms
-Code related to ECDH
-Derive a shared bits between two ECDH key pairs
example
const keyPair = await ECDH.generateKey();
const otherKeyPair = await ECDH.generateKey();
const bits = await ECDH.deriveBits(
{ public: otherKeyPair.publicKey.self },
keyPair.privateKey.self,
128
);
example
const keyPair = await ECDH.generateKey();
const otherKeyPair = await ECDH.generateKey();
const bits = await keyPair.privateKey.deriveBits(
{ public: otherKeyPair.publicKey.self },
128
);
-Derive a shared key between two ECDH key pairs
example
const keyPair = await ECDH.generateKey();
const otherKeyPair = await ECDH.generateKey();
const hmacParams: params.EnforcedHmacKeyGenParams = {
name: Authentication.Alg.Code.HMAC,
hash: SHA.Alg.Variant.SHA_512,
length: 512,
};
let key = await ECDH.deriveKey(
{ public: otherKeyPair.publicKey.self },
keyPair.privateKey.self,
hmacParams
);
example
const keyPair = await ECDH.generateKey();
const otherKeyPair = await ECDH.generateKey();
const hmacParams: params.EnforcedHmacKeyGenParams = {
name: Authentication.Alg.Code.HMAC,
hash: SHA.Alg.Variant.SHA_512,
length: 512,
};
let key = await keyPair.privateKey.deriveKey(
{ public: otherKeyPair.publicKey.self },
hmacParams
);
-Export an ECDH public or private key
example
const pubKeyJwk = await ECDH.exportKey("jwk", keyPair.publicKey.self);
@@ -22,7 +22,7 @@
example
const privKeyJwk = await keyPair.privateKey.exportKey("jwk");
-Generate a new ECDH keypair
example
const keyPair = await ECDH.generateKey();
@@ -32,7 +32,7 @@
Generate a new ECDH keypair
alias
generateKey
example
const keyPair = await ECDH.generateKeyPair();
@@ -43,7 +43,7 @@
Import an ECDH public or private key
example
const pubKey = await ECDH.importKey("jwk", pubKeyJwk, { namedCurve: "P-521" }, true, []);
diff --git a/modules/ec_ecdsa.html b/modules/ec_ecdsa.html
index 9a3bc2dc..1c2ad784 100644
--- a/modules/ec_ecdsa.html
+++ b/modules/ec_ecdsa.html
@@ -1,6 +1,6 @@
-Code related to ECDSA
-Export an ECDSA public or private key
example
const pubKeyJwk = await ECDSA.exportKey("jwk", keyPair.publicKey.self);
@@ -10,7 +10,7 @@
example
const privKeyJwk = await keyPair.privateKey.exportKey("jwk");
-Generate a new ECDSA keypair
example
const keyPair = await ECDSA.generateKey();
@@ -20,7 +20,7 @@
Generate a new ECDSA keypair
alias
generateKey
example
const keyPair = await ECDSA.generateKeyPair();
@@ -31,7 +31,7 @@
Import an ECDSA public or private key
example
const pubKey = await ECDSA.importKey("jwk", pubKeyJwk, { namedCurve: "P-521" }, true, ['verify']);
@@ -39,13 +39,13 @@
Sign a given payload
example
const message = new TextEncoder().encode("a message");
const signature = await ECDSA.sign({hash: "SHA-512"}, keyPair.privateKey.self, message);
example
const message = new TextEncoder().encode("a message");
const signature = await keyPair.privateKey.sign({hash: "SHA-512"}, message);
-Verify a given signature
example
const message = new TextEncoder().encode("a message");
const isVerified = await ECDSA.verify({hash: "SHA-512"}, keyPair.publicKey.self, signature, message);
diff --git a/modules/ec_shared.Alg.html b/modules/ec_shared.Alg.html
index bfcbc474..a1997b61 100644
--- a/modules/ec_shared.Alg.html
+++ b/modules/ec_shared.Alg.html
@@ -1 +1 @@
-Shared code for EC
-Code related to HMAC
-Export an HMAC key into the specified format
example
const jwk = await HMAC.exportKey("jwk", key.self);
example
const jwk = await key.exportKey("jwk");
-Generate a new HMAC key
example
const key = await HMAC.generateKey();
Import an HMAC key from the specified format
example
const key = await HMAC.importKey("jwk", jwk, {hash: "SHA-512"});
-Sign a given payload
example
const message = new TextEncoder().encode("a message");
const signature = await HMAC.sign(key.self, message);
const message = new TextEncoder().encode("a message");
const signature = await key.sign(message);
-Verify a given signature
example
const isVerified = await HMAC.verify(key, signature, message);
diff --git a/modules/index.html b/modules/index.html
index f438622f..ebb21e04 100644
--- a/modules/index.html
+++ b/modules/index.html
@@ -1,5 +1,5 @@
-All key derivation functions
-Code related to HKDF
-Derive a number bits with a given key material
example
const salt = await Random.Salt.generate();
const info = await Random.getValues(6);
const bits = await HKDF.deriveBits(
{ salt, info, hash: "SHA-512" },
keyMaterial,
128
);
example
const salt = await Random.Salt.generate();
const info = await Random.getValues(6);
const bits = await keyMaterial.deriveBits(
{ salt, info, hash: "SHA-512" },
128
);
-Derive a shared key from HKDF key material
example
const hmacParams: params.EnforcedHmacKeyGenParams = {
name: Authentication.Alg.Code.HMAC,
hash: SHA.Alg.Variant.SHA_512,
length: 512,
};
const salt = await Random.Salt.generate();
const info = await Random.getValues(6);
let key = await HKDF.deriveKey(
{ salt, info, hash: "SHA-512" },
keyMaterial,
hmacParams
);
example
const hmacParams: params.EnforcedHmacKeyGenParams = {
name: Authentication.Alg.Code.HMAC,
hash: SHA.Alg.Variant.SHA_512,
length: 512,
};
const salt = await Random.Salt.generate();
const info = await Random.getValues(6);
let key = await keyMaterial.deriveKey(
{ salt, info, hash: "SHA-512" },
hmacParams
);
-Generate key material for deriving
example
const keyMaterial = await HKDF.generateKeyMaterial("raw", new TextEncoder().encode("lots_of_entropy"));
diff --git a/modules/kdf_pbkdf.html b/modules/kdf_pbkdf.html
index a1eb9695..c205a29d 100644
--- a/modules/kdf_pbkdf.html
+++ b/modules/kdf_pbkdf.html
@@ -1,18 +1,18 @@
-Code related to PBKDF2
-Derive a number bits with a given key material
example
const bits = await PBKDF2.deriveBits(
{ hash: "SHA-512" },
keyMaterial,
128
);
example
const bits = await keyMaterial.deriveBits(
{ hash: "SHA-512" },
128
);
-Derive a shared key from PBKDF2 key material
example
const hmacParams: params.EnforcedHmacKeyGenParams = {
name: Authentication.Alg.Code.HMAC,
hash: SHA.Alg.Variant.SHA_512,
length: 512,
};
let key = await PBKDF2.deriveKey(
{ hash: "SHA512" },
keyMaterial,
hmacParams
);
example
const hmacParams: params.EnforcedHmacKeyGenParams = {
name: Authentication.Alg.Code.HMAC,
hash: SHA.Alg.Variant.SHA_512,
length: 512,
};
let key = await keyMaterial.deriveKey(
{ hash: "SHA512" },
hmacParams
);
-Generate key material for deriving
example
const keyMaterial = await PBKDF2.generateKeyMaterial("raw", new TextEncoder().encode("could_be_a_little_entropy"));
diff --git a/modules/kdf_shared.Alg.html b/modules/kdf_shared.Alg.html
index 0977f21f..ee637497 100644
--- a/modules/kdf_shared.Alg.html
+++ b/modules/kdf_shared.Alg.html
@@ -1 +1 @@
-Shared code for KDF
Key usages and allowed formats
-Enforced parameters for algorithms
-Code related to proxying CryptoKey and CryptoKeyPair
-Initialization Vectors
-Generate an initialization vector. Defaults to 16 bytes.
example
const iv = await Random.IV.generate();
diff --git a/modules/random.Salt.html b/modules/random.Salt.html
index ce2043cf..c57f1a1a 100644
--- a/modules/random.Salt.html
+++ b/modules/random.Salt.html
@@ -1,6 +1,6 @@
-Salts
-Generate a salt. Defaults to 16 bytes.
example
const salt = await Random.Salt.generate();
diff --git a/modules/random.UUID.html b/modules/random.UUID.html
index 9976f36e..87bf00d7 100644
--- a/modules/random.UUID.html
+++ b/modules/random.UUID.html
@@ -1,6 +1,6 @@
-UUID
-Generate a UUID.
example
const uuid = await Random.UUID.generate();
diff --git a/modules/random.html b/modules/random.html
index 6a70815a..b7ff5ff3 100644
--- a/modules/random.html
+++ b/modules/random.html
@@ -1,6 +1,6 @@
-Cryptographically strong random values.
-Generate random values
example
const values = await Random.getValues(16);
diff --git a/modules/rsa.html b/modules/rsa.html
index a86bc89a..03a95b32 100644
--- a/modules/rsa.html
+++ b/modules/rsa.html
@@ -1,3 +1,3 @@
-All RSA algorithms
-Code related to RSA_OAEP
-Decrypt with an RSA_OAEP private key
example
const data = await RSA_OAEP.decrypt({label}, keyPair.privateKey.self, data);
example
const data = await keyPair.privateKey.decrypt({label}, data);
-Encrypt with an RSA_OAEP public key
example
const message = new TextEncoder().encode("a message");
const data = await RSA_OAEP.encrypt({label}, keyPair.publicKey.self, message);
example
const message = new TextEncoder().encode("a message");
const data = await keyPair.publicKey.encrypt({label}, message);
-Export an RSA_OAEP public or private key
example
const pubKeyJwk = await RSA_OAEP.exportKey("jwk", keyPair.publicKey.self);
example
const pubKeyJwk = await keyPair.publicKey.exportKey("jwk");
const privKeyJwk = await keyPair.privateKey.exportKey("jwk");
-Generate a new RSA_OAEP keypair
example
const keyPair = await RSA_OAEP.generateKey();
@@ -26,7 +26,7 @@
hash: SHA.Variant.SHA_512,
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
-}Generate a new RSA_OAEP keypair
alias
generateKey
example
const keyPair = await RSA_OAEP.generateKeyPair();
@@ -35,17 +35,17 @@
hash: SHA.Variant.SHA_512,
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
-}Optional extractable: boolean
Optional keyUsages: KeyUsage[]
Returns Promise<RsaOaepProxiedCryptoKeyPair>
Import an RSA_OAEP public or private key
example
const key = await RSA_OAEP.importKey("jwk", pubKey, { hash: "SHA-512" }, true, ['encrypt']);
-Unwrap a wrapped key using the key encryption key
example
const wrappedKey = await RSA_OAEP.wrapKey("raw", dek.self, kek.self);
const unwrappedKey = await RSA_OAEP.unwrapKey(
"raw",
wrappedKey,
{ name: Alg.Mode.RSA_OAEP },
kek.self,
);
const wrappedKey = await kek.wrapKey("raw", dek.self);
const unwrappedKey = await kek.unwrapKey(
"raw",
wrappedKey,
{ name: Alg.Mode.RSA_OAEP },
);
-Wrap another key with an RSA_OAEP public key
example
const kek = await RSA_OAEP.generateKey(undefined, true, ['wrapKey', 'unwrapKey']);
const dek = await RSA_OAEP.generateKey();
const label = await Random.getValues(8);
const wrappedKey = await RSA_OAEP.wrapKey("raw", dek.self, kek.self, {label});
diff --git a/modules/rsa_rsa_pss.html b/modules/rsa_rsa_pss.html
index 188fa34c..32cc5797 100644
--- a/modules/rsa_rsa_pss.html
+++ b/modules/rsa_rsa_pss.html
@@ -1,12 +1,12 @@
-Code related to RSA_PSS
-Export an RSA_PSS public or private key
example
const pubKeyJwk = await RSA_PSS.importKey("jwk", keyPair.publicKey.self);
example
const pubKeyJwk = await keyPair.publicKey.importKey("jwk");
-Generate a new RSA_PSS keypair
example
const keyPair = await RSA_PSS.generateKey();
@@ -14,7 +14,7 @@
hash: SHA.Variant.SHA_512,
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
-}Generate a new RSA_PSS keypair
alias
generateKey
example
const keyPair = await RSA_PSS.generateKeyPair();
@@ -23,17 +23,17 @@
hash: SHA.Variant.SHA_512,
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
-}Optional extractable: boolean
Optional keyUsages: KeyUsage[]
Returns Promise<RsaPssProxiedCryptoKeyPair>
Import an RSA_PSS public or private key
example
const key = await RSA_PSS.importKey("jwk", pubKey, { hash: "SHA-512" }, true, ['verify']);
-Sign a given payload
example
const message = new TextEncoder().encode("a message");
const signature = await RSA_PSS.sign(128, keyPair.privateKey.self, message);
example
const message = new TextEncoder().encode("a message");
const signature = await keyPair.privateKey.sign(128, message);
-Verify a given signature
example
const message = new TextEncoder().encode("a message");
const isVerified = await ECDSA.verify(128, keyPair.publicKey.self, signature, message);
diff --git a/modules/rsa_rsassa_pkcs1_v1_5.html b/modules/rsa_rsassa_pkcs1_v1_5.html
index 93ae0d1f..51a05925 100644
--- a/modules/rsa_rsassa_pkcs1_v1_5.html
+++ b/modules/rsa_rsassa_pkcs1_v1_5.html
@@ -1,12 +1,12 @@
-Code related to RSASSA_PKCS1_v1_5
-Export an RSASSA_PKCS1_v1_5 public or private key
example
const pubKeyJwk = await RSASSA_PKCS1_v1_5.importKey("jwk", keyPair.publicKey.self);
example
const pubKeyJwk = await keyPair.publicKey.importKey("jwk");
-Generate a new RSASSA_PKCS1_v1_5 keypair
example
const keyPair = await RSASSA_PKCS1_v1_5.generateKey();
@@ -14,7 +14,7 @@
hash: SHA.Variant.SHA_512,
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
-}Generate a new RSASSA_PKCS1_v1_5 keypair
alias
generateKey
example
const keyPair = await RSASSA_PKCS1_v1_5.generateKeyPair();
@@ -23,17 +23,17 @@
hash: SHA.Variant.SHA_512,
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
-}Optional extractable: boolean
Optional keyUsages: KeyUsage[]
Returns Promise<RsassaPkcs1V15ProxiedCryptoKeyPair>
Import an RSASSA_PKCS1_v1_5 public or private key
example
const key = await RSASSA_PKCS1_v1_5.importKey("jwk", pubKey, { hash: "SHA-512" }, true, ['verify']);
-Sign a given payload
example
const message = new TextEncoder().encode("a message");
const signature = await RSASSA_PKCS1_v1_5.sign(keyPair.privateKey.self, message);
example
const message = new TextEncoder().encode("a message");
const signature = await keyPair.privateKey.sign(message);
-Verify a given signature
example
const message = new TextEncoder().encode("a message");
const isVerified = await RSASSA_PKCS1_v1_5.verify(keyPair.publicKey.self, signature, message);
diff --git a/modules/rsa_shared.Alg.html b/modules/rsa_shared.Alg.html
index 54dd6f41..208f993f 100644
--- a/modules/rsa_shared.Alg.html
+++ b/modules/rsa_shared.Alg.html
@@ -1 +1 @@
-Shared code for RSA
-All SHA algorithms
-Code related to SHA_1
-Get the digest of the buffer
example
const buffer = new TextEncoder().encode("a file");
const digest = SHA_1.digest(buffer);
-Get the hex string of the digest
example
const hash = SHA_1.hexify(digest);
diff --git a/modules/sha_sha_256.html b/modules/sha_sha_256.html
index 9d5dd2a6..01c12432 100644
--- a/modules/sha_sha_256.html
+++ b/modules/sha_sha_256.html
@@ -1,10 +1,10 @@
-Code related to SHA_256
-Get the digest of the buffer
example
const buffer = new TextEncoder().encode("a file");
const digest = SHA_256.digest(buffer);
-Get the hex string of the digest
example
const hash = SHA_256.hexify(digest);
diff --git a/modules/sha_sha_384.html b/modules/sha_sha_384.html
index 3c33cd7c..3f830ba2 100644
--- a/modules/sha_sha_384.html
+++ b/modules/sha_sha_384.html
@@ -1,10 +1,10 @@
-Code related to SHA_384
-Get the digest of the buffer
example
const buffer = new TextEncoder().encode("a file");
const digest = SHA_384.digest(buffer);
-Get the hex string of the digest
example
const hash = SHA_384.hexify(digest);
diff --git a/modules/sha_sha_512.html b/modules/sha_sha_512.html
index ea548c61..b8eab441 100644
--- a/modules/sha_sha_512.html
+++ b/modules/sha_sha_512.html
@@ -1,10 +1,10 @@
-Code related to SHA_512
-Get the digest of the buffer
example
const buffer = new TextEncoder().encode("a file");
const digest = SHA_512.digest(buffer);
-Get the hex string of the digest
example
const hash = SHA_512.hexify(digest);
diff --git a/modules/sha_shared.Alg.html b/modules/sha_shared.Alg.html
index 2089655c..f5b79c26 100644
--- a/modules/sha_shared.Alg.html
+++ b/modules/sha_shared.Alg.html
@@ -1 +1 @@
-Shared code for SHA
-