randbytes
Version:
Get a buffer of random bytes from /dev/urandom file, time or another source
25 lines (20 loc) • 528 B
JavaScript
// Generated by CoffeeScript 1.4.0
(function() {
var timerandom, urandom;
timerandom = require('./lib/timerandom');
urandom = require('./lib/urandom');
module.exports = {
timeRandom: timerandom,
urandom: urandom,
getRandomBytes: function(cant, cb) {
var randSource;
randSource = urandom.getInstance();
return randSource.getRandomBytes(cant, cb);
},
getHighRandomSource: function() {
return new urandom({
filePath: '/dev/random'
});
}
};
}).call(this);