summaryrefslogtreecommitdiff
path: root/ext/crypto/01_webidl.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/crypto/01_webidl.js')
-rw-r--r--ext/crypto/01_webidl.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/crypto/01_webidl.js b/ext/crypto/01_webidl.js
index 4216cb524..43bc5e822 100644
--- a/ext/crypto/01_webidl.js
+++ b/ext/crypto/01_webidl.js
@@ -178,6 +178,29 @@
webidl.converters.HmacImportParams = webidl
.createDictionaryConverter("HmacImportParams", dictHmacImportParams);
+ const dictPbkdf2Params = [
+ ...dictAlgorithm,
+ {
+ key: "hash",
+ converter: webidl.converters.HashAlgorithmIdentifier,
+ required: true,
+ },
+ {
+ key: "iterations",
+ converter: (V, opts) =>
+ webidl.converters["unsigned long"](V, { ...opts, enforceRange: true }),
+ required: true,
+ },
+ {
+ key: "salt",
+ converter: webidl.converters["BufferSource"],
+ required: true,
+ },
+ ];
+
+ webidl.converters.Pbkdf2Params = webidl
+ .createDictionaryConverter("Pbkdf2Params", dictPbkdf2Params);
+
webidl.converters.CryptoKey = webidl.createInterfaceConverter(
"CryptoKey",
CryptoKey,