| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 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 | |||||
| 4 | var crypto = require('crypto'); | ||||
| 5 | |||||
| 6 | module.exports = function nodeRNG() { | ||||
| 7 | return crypto.randomBytes(16); | ||||
| 8 | }; | ||||