From c41460ecc421ac7730cc5455542e5e05f7366c4a Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 14 Sep 2021 18:51:20 +0530 Subject: feat(ext/crypto): import RSA pkcs#8 keys (#11891) --- ext/crypto/lib.deno_crypto.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (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 5a554015a..55b94c24d 100644 --- a/ext/crypto/lib.deno_crypto.d.ts +++ b/ext/crypto/lib.deno_crypto.d.ts @@ -69,6 +69,10 @@ interface EcdsaParams extends Algorithm { hash: HashAlgorithmIdentifier; } +interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; +} + interface RsaHashedKeyGenParams extends RsaKeyGenParams { hash: HashAlgorithmIdentifier; } @@ -170,9 +174,9 @@ interface SubtleCrypto { keyUsages: KeyUsage[], ): Promise; importKey( - format: "raw", + format: Exclude, keyData: BufferSource, - algorithm: AlgorithmIdentifier | HmacImportParams, + algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[], ): Promise; -- cgit v1.2.3