From 8884141c3f08a04ff3315555c62d120c7647efbe Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Sun, 3 Oct 2021 18:54:46 +0530 Subject: fix(ext/crypto): missing Aes key typings (#12307) --- ext/crypto/lib.deno_crypto.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (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 3dd66d59a..673e8f9cb 100644 --- a/ext/crypto/lib.deno_crypto.d.ts +++ b/ext/crypto/lib.deno_crypto.d.ts @@ -125,6 +125,14 @@ interface Pbkdf2Params extends Algorithm { salt: BufferSource; } +interface AesKeyGenParams extends Algorithm { + length: number; +} + +interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; +} + /** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */ interface CryptoKey { readonly algorithm: KeyAlgorithm; @@ -157,7 +165,7 @@ interface SubtleCrypto { keyUsages: KeyUsage[], ): Promise; generateKey( - algorithm: HmacKeyGenParams, + algorithm: AesKeyGenParams | HmacKeyGenParams, extractable: boolean, keyUsages: KeyUsage[], ): Promise; -- cgit v1.2.3