summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2021-08-25 01:29:02 +0530
committerGitHub <noreply@github.com>2021-08-24 21:59:02 +0200
commit85a56e7144cb2e213eb670f754027d19e31c315a (patch)
treebc9757ef1340a14cd0efce3856bda3ef5ba9f2fa /ext/crypto/lib.deno_crypto.d.ts
parent4853be20f2d649842ebc97124d8479c7aad7cc9b (diff)
feat(ext/crypto): implement encrypt, decrypt & generateKey for RSA-OAEP (#11654)
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts
index fa4a76c90..6b1901611 100644
--- a/ext/crypto/lib.deno_crypto.d.ts
+++ b/ext/crypto/lib.deno_crypto.d.ts
@@ -54,6 +54,10 @@ interface RsaPssParams extends Algorithm {
saltLength: number;
}
+interface RsaOaepParams extends Algorithm {
+ label?: Uint8Array;
+}
+
interface HmacImportParams extends Algorithm {
hash: HashAlgorithmIdentifier;
length?: number;
@@ -141,6 +145,16 @@ interface SubtleCrypto {
algorithm: AlgorithmIdentifier,
data: BufferSource,
): Promise<ArrayBuffer>;
+ encrypt(
+ algorithm: AlgorithmIdentifier | RsaOaepParams,
+ key: CryptoKey,
+ data: BufferSource,
+ ): Promise<ArrayBuffer>;
+ decrypt(
+ algorithm: AlgorithmIdentifier | RsaOaepParams,
+ key: CryptoKey,
+ data: BufferSource,
+ ): Promise<ArrayBuffer>;
}
declare interface Crypto {