diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2021-08-24 18:45:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 15:15:25 +0200 |
commit | 46e4ba38b2b1ccee8d3b4f04be1a2cc0b42cd52a (patch) | |
tree | 6bde193c4bf5a754b308e71926160f9c40436ef4 | |
parent | 1b7848c4a9f6ba848452c9b3a9e88e95c17ab295 (diff) |
fix(ext/crypto): KeyAlgorithm typings for supported algorithms (#11738)
-rw-r--r-- | ext/crypto/lib.deno_crypto.d.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts index c00978592..fa4a76c90 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; |