From 9a42d65fc73cea9c8c523a2733d0b180bcdd78e7 Mon Sep 17 00:00:00 2001 From: Sean Michael Wykes <8363933+SeanWykes@users.noreply.github.com> Date: Mon, 3 Jan 2022 08:27:28 -0300 Subject: feat(ext/crypto): support AES-CTR encrypt/decrypt (#13177) Fixes #13201. --- ext/crypto/lib.deno_crypto.d.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'ext/crypto/lib.deno_crypto.d.ts') 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; encrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCbcParams, + algorithm: + | AlgorithmIdentifier + | RsaOaepParams + | AesCbcParams + | AesCtrParams, key: CryptoKey, data: BufferSource, ): Promise; decrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCbcParams, + algorithm: + | AlgorithmIdentifier + | RsaOaepParams + | AesCbcParams + | AesCtrParams, key: CryptoKey, data: BufferSource, ): Promise; -- cgit v1.2.3