mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
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)
This commit is contained in:
parent
147411e64b
commit
f632b4a92e
2 changed files with 6 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -909,10 +909,12 @@
|
|||
"historical.any.html": false,
|
||||
"historical.any.worker.html": false,
|
||||
"idlharness.https.any.html": [
|
||||
"Window interface: attribute crypto"
|
||||
"Window interface: attribute crypto",
|
||||
"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)"
|
||||
],
|
||||
"idlharness.https.any.worker.html": [
|
||||
"WorkerGlobalScope interface: attribute crypto"
|
||||
"WorkerGlobalScope interface: attribute crypto",
|
||||
"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)"
|
||||
],
|
||||
"import_export": {
|
||||
"ec_importKey.https.any.html": [
|
||||
|
|
Loading…
Reference in a new issue