File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -562,16 +562,24 @@ changes:
562562
563563* `algorithm`: {AlgorithmIdentifier|EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params}
564564* `baseKey`: {CryptoKey}
565- * `length`: {number}
565+ * `length`: {number|null }
566566* Returns: {Promise} containing {ArrayBuffer}
567567
568568<!--lint enable maximum-line-length remark-lint-->
569569
570570Using the method and parameters specified in `algorithm` and the keying
571571material provided by `baseKey`, `subtle.deriveBits()` attempts to generate
572- `length` bits. The Node.js implementation requires that `length` is a
573- multiple of `8`. If successful, the returned promise will be resolved with
574- an {ArrayBuffer} containing the generated data.
572+ `length` bits.
573+
574+ The Node.js implementation requires that when `length` is a
575+ number it must be multiple of `8`.
576+
577+ When `length` is `null` the maximum number of bits for a given algorithm is
578+ generated. This is allowed for the `'ECDH'`, `'X25519'`[^1], and `'X448'`[^1]
579+ algorithms.
580+
581+ If successful, the returned promise will be resolved with an {ArrayBuffer}
582+ containing the generated data.
575583
576584The algorithms currently supported include:
577585
You can’t perform that action at this time.
0 commit comments