summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
authorSean Michael Wykes <8363933+SeanWykes@users.noreply.github.com>2022-01-03 08:27:28 -0300
committerGitHub <noreply@github.com>2022-01-03 12:27:28 +0100
commit9a42d65fc73cea9c8c523a2733d0b180bcdd78e7 (patch)
tree3a2aceb308a5006138b5cb2daab27e8fa5699493 /ext/crypto/lib.deno_crypto.d.ts
parenta721c34c19a07ece6677f4efc8aa0db881b310f0 (diff)
feat(ext/crypto): support AES-CTR encrypt/decrypt (#13177)
Fixes #13201.
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts17
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts
index 6a3255745..f7d735721 100644
--- a/ext/crypto/lib.deno_crypto.d.ts
+++ b/ext/crypto/lib.deno_crypto.d.ts
@@ -62,6 +62,11 @@ interface AesCbcParams extends Algorithm {
iv: BufferSource;
}
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
interface HmacKeyGenParams extends Algorithm {
hash: HashAlgorithmIdentifier;
length?: number;
@@ -239,12 +244,20 @@ interface SubtleCrypto {
data: BufferSource,
): Promise<ArrayBuffer>;
encrypt(
- algorithm: AlgorithmIdentifier | RsaOaepParams | AesCbcParams,
+ algorithm:
+ | AlgorithmIdentifier
+ | RsaOaepParams
+ | AesCbcParams
+ | AesCtrParams,
key: CryptoKey,
data: BufferSource,
): Promise<ArrayBuffer>;
decrypt(
- algorithm: AlgorithmIdentifier | RsaOaepParams | AesCbcParams,
+ algorithm:
+ | AlgorithmIdentifier
+ | RsaOaepParams
+ | AesCbcParams
+ | AesCtrParams,
key: CryptoKey,
data: BufferSource,
): Promise<ArrayBuffer>;