Full commit for review
This commit is contained in:
14
api/modules/random.js
Normal file
14
api/modules/random.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
function random(x, y) {
|
||||
return crypto.randomInt(x, y);
|
||||
}
|
||||
|
||||
function randomHEX(x) {
|
||||
return crypto.randomBytes(x).toString('hex');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
random,
|
||||
randomHEX,
|
||||
};
|
||||
Reference in New Issue
Block a user