Mercurial > njs
changeset 2578:cf91a31a0947
Types: added TS definitions for WebCrypto ECDH.
| author | Dmitry Volyntsev <xeioex@nginx.com> |
|---|---|
| date | Mon, 16 Jun 2025 18:16:46 -0700 |
| parents | 09355ab5e63a |
| children | 8b6a2ce70d39 |
| files | ts/njs_webcrypto.d.ts |
| diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ts/njs_webcrypto.d.ts Mon Jun 16 18:03:41 2025 -0700 +++ b/ts/njs_webcrypto.d.ts Mon Jun 16 18:16:46 2025 -0700 @@ -41,12 +41,12 @@ } 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 @@ | AesImportParams | AesVariants | "PBKDF2" - | "HKDF"; + | "HKDF" + | "ECDH"; type GenerateAlgorithm = | RsaHashedKeyGenParams @@ -99,9 +100,15 @@ interations: number; } +interface EcdhParams { + name: "ECDH"; + public: CryptoKey; +} + type DeriveAlgorithm = | HkdfParams - | Pbkdf2Params; + | Pbkdf2Params + | EcdhParams; interface HmacKeyGenParams { name: "HMAC";
