details:   
https://github.com/nginx/njs/commit/c5b1d59fe0a18a77b6a4a3fd9f93ad2b4d497225
branches:  master
commit:    c5b1d59fe0a18a77b6a4a3fd9f93ad2b4d497225
user:      Dmitry Volyntsev <xei...@nginx.com>
date:      Mon, 16 Jun 2025 18:16:46 -0700
description:
Types: added TS definitions for WebCrypto ECDH.


---
 ts/njs_webcrypto.d.ts | 15 +++++++++++----
 1 file 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";
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to