From 46e4ba38b2b1ccee8d3b4f04be1a2cc0b42cd52a Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 24 Aug 2021 18:45:25 +0530 Subject: [PATCH] fix(ext/crypto): KeyAlgorithm typings for supported algorithms (#11738) --- ext/crypto/lib.deno_crypto.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts index c009785922..fa4a76c905 100644 --- a/ext/crypto/lib.deno_crypto.d.ts +++ b/ext/crypto/lib.deno_crypto.d.ts @@ -59,6 +59,24 @@ interface HmacImportParams extends Algorithm { length?: number; } +interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; +} + +interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; +} + +interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; +} + +interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: Uint8Array; +} + /** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */ interface CryptoKey { readonly algorithm: KeyAlgorithm;