rng.js 246 B

12345678
  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. };