Files
cloudron-box/src/hat.js
Girish Ramakrishnan 12e073e8cf use node: prefix for requires
mostly because code is being autogenerated by all the AI stuff using
this prefix. it's also used in the stack trace.
2025-08-14 12:55:35 +05:30

10 lines
168 B
JavaScript

'use strict';
exports = module.exports = hat;
const crypto = require('node:crypto');
function hat(bits) {
return crypto.randomBytes(bits / 8).toString('hex');
}