MCPcopy Index your code
hub / github.com/nodejs/node / getRandomBytesAlias

Function getRandomBytesAlias

lib/crypto.js:299–340  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

297});
298
299function 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
342ObjectDefineProperties(module.exports, {
343 fips: {

Callers 1

crypto.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected