@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
17 lines (16 loc) • 554 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const crypto = require("crypto");
const yargs = require("yargs");
const colors_1 = require("../colors");
const script_1 = require("../script");
(0, script_1.runScript)(() => {
const { sizeBytes } = yargs.option('sizeBytes', {
type: 'number',
default: 256,
}).argv;
const key = crypto.randomBytes(sizeBytes).toString('base64');
console.log((0, colors_1.dimGrey)('\nSECRET_ENCRYPTION_KEY:\n'));
console.log(key, '\n');
});