diff options
author | Luca Casonato <hello@lcas.dev> | 2021-12-14 17:02:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 17:02:14 +0100 |
commit | b220a58d1a678ffd46a42567909d0b0d59731d99 (patch) | |
tree | 423a9c086696e77b58a71317e005a713903fb7f5 /ext/crypto/lib.deno_crypto.d.ts | |
parent | 5fe4d5c818d598abfdfc9ef1db0b00f56cf03c20 (diff) |
feat(ext/crypto): support exporting RSA JWKs (#13081)
This commit adds support for exporting RSA JWKs in the Web Crypto API.
It also does some minor fixes for RSA JWK imports.
Co-authored-by: Sean Michael Wykes <sean.wykes@nascent.com.br>
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r-- | ext/crypto/lib.deno_crypto.d.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts index 0338448af..7681a56ab 100644 --- a/ext/crypto/lib.deno_crypto.d.ts +++ b/ext/crypto/lib.deno_crypto.d.ts @@ -101,6 +101,10 @@ interface HmacImportParams extends Algorithm { length?: number; } +interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; +} + interface EcKeyAlgorithm extends KeyAlgorithm { namedCurve: NamedCurve; } @@ -191,7 +195,7 @@ interface SubtleCrypto { importKey( format: "jwk", keyData: JsonWebKey, - algorithm: AlgorithmIdentifier | HmacImportParams, + algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[], ): Promise<CryptoKey>; |