rng.js 246 B

123456789
  1. // Unique ID creation requires a high quality random # generator. In node.js
  2. // this is pretty straight-forward - we use the crypto API.
  3. var crypto = require('crypto');
  4. module.exports = function nodeRNG() {
  5. return crypto.randomBytes(16);
  6. };