mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 13:53:32 +00:00

PR-URL: https://github.com/nodejs/node/pull/10781 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
11 lines
239 B
JavaScript
11 lines
239 B
JavaScript
// Unique ID creation requires a high quality random # generator. In node.js
|
|
// this is prett straight-forward - we use the crypto API.
|
|
|
|
var rb = require('crypto').randomBytes;
|
|
|
|
function rng() {
|
|
return rb(16);
|
|
};
|
|
|
|
module.exports = rng;
|