UNPKG

677 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const base_command_1 = require("../base-command");
4const security_1 = require("@bearer/security");
5class Encrypt extends base_command_1.default {
6 async run() {
7 const { args } = this.parse(Encrypt);
8 const cipher = new security_1.default(args.encryptionKey);
9 this.log(cipher.encrypt(args.message));
10 }
11}
12Encrypt.hidden = true;
13Encrypt.description = 'encrypt using bearer security';
14Encrypt.flags = Object.assign({}, base_command_1.default.flags);
15Encrypt.args = [{ name: 'encryptionKey', required: true }, { name: 'message', required: true }];
16exports.default = Encrypt;