summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
authorSean Michael Wykes <8363933+SeanWykes@users.noreply.github.com>2021-12-16 13:28:43 -0300
committerGitHub <noreply@github.com>2021-12-16 17:28:43 +0100
commit60faf7a0edd492771943e603ec3d01c3602150e8 (patch)
tree81de27bb87d50365b8245a37691faf92d3a787b1 /ext/crypto/lib.deno_crypto.d.ts
parent8efe829fca5ddea855b7f569c74b67c161ec4b06 (diff)
feat(ext/crypto): support importing ECSDA and ECDH (#13088)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts
index 7681a56ab..6a3255745 100644
--- a/ext/crypto/lib.deno_crypto.d.ts
+++ b/ext/crypto/lib.deno_crypto.d.ts
@@ -71,6 +71,10 @@ interface EcKeyGenParams extends Algorithm {
namedCurve: NamedCurve;
}
+interface EcImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
interface EcdsaParams extends Algorithm {
hash: HashAlgorithmIdentifier;
}
@@ -195,14 +199,22 @@ interface SubtleCrypto {
importKey(
format: "jwk",
keyData: JsonWebKey,
- algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams,
+ algorithm:
+ | AlgorithmIdentifier
+ | HmacImportParams
+ | RsaHashedImportParams
+ | EcImportParams,
extractable: boolean,
keyUsages: KeyUsage[],
): Promise<CryptoKey>;
importKey(
format: Exclude<KeyFormat, "jwk">,
keyData: BufferSource,
- algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams,
+ algorithm:
+ | AlgorithmIdentifier
+ | HmacImportParams
+ | RsaHashedImportParams
+ | EcImportParams,
extractable: boolean,
keyUsages: KeyUsage[],
): Promise<CryptoKey>;