summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2021-10-03 18:54:46 +0530
committerGitHub <noreply@github.com>2021-10-03 15:24:46 +0200
commit8884141c3f08a04ff3315555c62d120c7647efbe (patch)
tree2e5eec064ee71db7e04f778ac7b6683289306467 /ext/crypto/lib.deno_crypto.d.ts
parent198f5b95140b52b5a3aad343e62fc0c9b03b9ae7 (diff)
fix(ext/crypto): missing Aes key typings (#12307)
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts10
1 files changed, 9 insertions, 1 deletions
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<CryptoKeyPair>;
generateKey(
- algorithm: HmacKeyGenParams,
+ algorithm: AesKeyGenParams | HmacKeyGenParams,
extractable: boolean,
keyUsages: KeyUsage[],
): Promise<CryptoKey>;