Files
cloudron-box/src/hat.js

10 lines
163 B
JavaScript
Raw Normal View History

'use strict';
exports = module.exports = hat;
2022-02-01 17:31:26 -08:00
const crypto = require('crypto');
2022-02-01 17:31:26 -08:00
function hat(bits) {
return crypto.randomBytes(bits / 8).toString('hex');
}