summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts
index 2e8d2f8b2..5169e5c3b 100644
--- a/ext/crypto/lib.deno_crypto.d.ts
+++ b/ext/crypto/lib.deno_crypto.d.ts
@@ -25,7 +25,7 @@ type KeyUsage =
| "unwrapKey"
| "verify"
| "wrapKey";
-
+type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
type NamedCurve = string;
interface RsaOtherPrimesInfo {
@@ -164,7 +164,11 @@ interface SubtleCrypto {
extractable: boolean,
keyUsages: KeyUsage[],
): Promise<CryptoKey>;
- exportKey(format: "raw", key: CryptoKey): Promise<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(
+ format: Exclude<KeyFormat, "jwk">,
+ key: CryptoKey,
+ ): Promise<ArrayBuffer>;
sign(
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,