| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -562,16 +562,24 @@ changes: | |||
| 562 | 562 | ||
| 563 | 563 | * `algorithm`: {AlgorithmIdentifier|EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params} | |
| 564 | 564 | * `baseKey`: {CryptoKey} | |
| 565 | - * `length`: {number} | ||
| 565 | + * `length`: {number|null} | ||
| 566 | 566 | * Returns: {Promise} containing {ArrayBuffer} | |
| 567 | 567 | ||
| 568 | 568 | <!--lint enable maximum-line-length remark-lint--> | |
| 569 | 569 | ||
| 570 | 570 | Using the method and parameters specified in `algorithm` and the keying | |
| 571 | 571 | material 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. | ||
| 575 | 583 | ||
| 576 | 584 | The algorithms currently supported include: | |
| 577 | 585 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments