| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4104,7 +4104,9 @@ added: v17.4.0 | |||
| 4104 | 4104 | * `typedArray` {Buffer|TypedArray|DataView|ArrayBuffer} | |
| 4105 | 4105 | * Returns: {Buffer|TypedArray|DataView|ArrayBuffer} Returns `typedArray`. | |
| 4106 | 4106 | ||
| 4107 | - A convenient alias for [`crypto.webcrypto.getRandomValues()`][]. | ||
| 4107 | + A convenient alias for [`crypto.webcrypto.getRandomValues()`][]. This | ||
| 4108 | + implementation is not compliant with the Web Crypto spec, to write | ||
| 4109 | + web-compatible code use [`crypto.webcrypto.getRandomValues()`][] instead. | ||
| 4108 | 4110 | ||
| 4109 | 4111 | ### `crypto.hkdf(digest, ikm, salt, info, keylen, callback)` | |
| 4110 | 4112 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -252,6 +252,10 @@ function getFipsForced() { | |||
| 252 | 252 | return 1; | |
| 253 | 253 | } | |
| 254 | 254 | ||
| 255 | + function getRandomValues(array) { | ||
| 256 | + return lazyWebCrypto().crypto.getRandomValues(array); | ||
| 257 | + } | ||
| 258 | + | ||
| 255 | 259 | ObjectDefineProperty(constants, 'defaultCipherList', { | |
| 256 | 260 | value: getOptionValue('--tls-cipher-list') | |
| 257 | 261 | }); | |
@@ -303,7 +307,7 @@ ObjectDefineProperties(module.exports, { | |||
| 303 | 307 | getRandomValues: { | |
| 304 | 308 | configurable: false, | |
| 305 | 309 | enumerable: true, | |
| 306 | - get() { return lazyWebCrypto().crypto.getRandomValues; }, | ||
| 310 | + get: () => getRandomValues, | ||
| 307 | 311 | set: undefined, | |
| 308 | 312 | }, | |
| 309 | 313 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments