10 lines
162 B
JavaScript
10 lines
162 B
JavaScript
'use strict';
|
|
|
|
exports = module.exports = hat;
|
|
|
|
var crypto = require('crypto');
|
|
|
|
function hat (bits) {
|
|
return crypto.randomBytes(bits / 8).toString('hex');
|
|
}
|