aboutsummaryrefslogtreecommitdiff
path: root/ts/njs_webcrypto.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ts/njs_webcrypto.d.ts')
-rw-r--r--ts/njs_webcrypto.d.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/ts/njs_webcrypto.d.ts b/ts/njs_webcrypto.d.ts
index 058359cb..4e6f2057 100644
--- a/ts/njs_webcrypto.d.ts
+++ b/ts/njs_webcrypto.d.ts
@@ -41,12 +41,12 @@ interface RsaHashedKeyGenParams {
}
interface EcKeyImportParams {
- name: "ECDSA";
+ name: "ECDSA" | "ECDH";
namedCurve: "P-256" | "P-384" | "P-521";
}
interface EcKeyGenParams {
- name: "ECDSA";
+ name: "ECDSA" | "ECDH";
namedCurve: "P-256" | "P-384" | "P-521";
}
@@ -68,7 +68,8 @@ type ImportAlgorithm =
| AesImportParams
| AesVariants
| "PBKDF2"
- | "HKDF";
+ | "HKDF"
+ | "ECDH";
type GenerateAlgorithm =
| RsaHashedKeyGenParams
@@ -99,9 +100,15 @@ interface Pbkdf2Params {
interations: number;
}
+interface EcdhParams {
+ name: "ECDH";
+ public: CryptoKey;
+}
+
type DeriveAlgorithm =
| HkdfParams
- | Pbkdf2Params;
+ | Pbkdf2Params
+ | EcdhParams;
interface HmacKeyGenParams {
name: "HMAC";