Files
cloudron-box/src/hat.js
T

10 lines
168 B
JavaScript
Raw Normal View History

2018-06-11 12:38:15 -07:00
'use strict';
exports = module.exports = hat;
2025-08-14 11:17:38 +05:30
const crypto = require('node:crypto');
2018-06-11 12:38:15 -07:00
2022-02-01 17:31:26 -08:00
function hat(bits) {
2018-06-11 12:38:15 -07:00
return crypto.randomBytes(bits / 8).toString('hex');
}