summaryrefslogtreecommitdiff
path: root/ext/crypto/00_crypto.js
diff options
context:
space:
mode:
authorFilip Skokan <panva.ip@gmail.com>2024-07-04 17:40:51 +0200
committerGitHub <noreply@github.com>2024-07-04 21:10:51 +0530
commitf632b4a92e4e2c552cf31749792075bad0814c22 (patch)
tree60146d157e6dacbd3b7cd33102d6bb26a23641ca /ext/crypto/00_crypto.js
parent147411e64b22fe74cb258125acab83f9182c9f81 (diff)
feat(ext/crypto): make deriveBits length parameter optional and nullable (#24426)
Updates SubtleCrypto.prototype.deriveBits as per https://github.com/w3c/webcrypto/pull/345 (WPT update in https://github.com/web-platform-tests/wpt/pull/43400)
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r--ext/crypto/00_crypto.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js
index 8f9c431ed..80a2e11c7 100644
--- a/ext/crypto/00_crypto.js
+++ b/ext/crypto/00_crypto.js
@@ -1131,10 +1131,10 @@ class SubtleCrypto {
* @param {number | null} length
* @returns {Promise<ArrayBuffer>}
*/
- async deriveBits(algorithm, baseKey, length) {
+ async deriveBits(algorithm, baseKey, length = null) {
webidl.assertBranded(this, SubtleCryptoPrototype);
const prefix = "Failed to execute 'deriveBits' on 'SubtleCrypto'";
- webidl.requiredArguments(arguments.length, 3, prefix);
+ webidl.requiredArguments(arguments.length, 2, prefix);
algorithm = webidl.converters.AlgorithmIdentifier(
algorithm,
prefix,