UNPKG

544 BJavaScriptView Raw
1#!/usr/bin/env node
2"use strict";
3Object.defineProperty(exports, "__esModule", { value: true });
4const crypto = require("crypto");
5const yargs = require("yargs");
6const colors_1 = require("../colors");
7const script_1 = require("../script");
8script_1.runScript(() => {
9 const { sizeBytes } = yargs.option('sizeBytes', {
10 type: 'number',
11 default: 256,
12 }).argv;
13 const key = crypto.randomBytes(sizeBytes).toString('base64');
14 console.log(colors_1.dimGrey('\nSECRET_ENCRYPTION_KEY:\n'));
15 console.log(key, '\n');
16});