(key)
| 297 | }); |
| 298 | |
| 299 | function getRandomBytesAlias(key) { |
| 300 | return { |
| 301 | enumerable: false, |
| 302 | configurable: true, |
| 303 | get() { |
| 304 | let value; |
| 305 | if (getOptionValue('--pending-deprecation')) { |
| 306 | value = deprecate( |
| 307 | randomBytes, |
| 308 | `crypto.${key} is deprecated.`, |
| 309 | 'DEP0115'); |
| 310 | } else { |
| 311 | value = randomBytes; |
| 312 | } |
| 313 | ObjectDefineProperty( |
| 314 | this, |
| 315 | key, |
| 316 | { |
| 317 | __proto__: null, |
| 318 | enumerable: false, |
| 319 | configurable: true, |
| 320 | writable: true, |
| 321 | value: value, |
| 322 | }, |
| 323 | ); |
| 324 | return value; |
| 325 | }, |
| 326 | set(value) { |
| 327 | ObjectDefineProperty( |
| 328 | this, |
| 329 | key, |
| 330 | { |
| 331 | __proto__: null, |
| 332 | enumerable: true, |
| 333 | configurable: true, |
| 334 | writable: true, |
| 335 | value, |
| 336 | }, |
| 337 | ); |
| 338 | }, |
| 339 | }; |
| 340 | } |
| 341 | |
| 342 | ObjectDefineProperties(module.exports, { |
| 343 | fips: { |