@sebastienrousseau/crypto-cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +274 -0
- package/dist/.DS_Store +0 -0
- package/dist/COPYRIGHT +15 -0
- package/dist/Makefile +122 -0
- package/dist/Report.txt +176 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +135 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/decrypt.command.d.ts +3 -0
- package/dist/commands/decrypt.command.d.ts.map +1 -0
- package/dist/commands/decrypt.command.js +42 -0
- package/dist/commands/decrypt.command.js.map +1 -0
- package/dist/commands/encrypt.command.d.ts +3 -0
- package/dist/commands/encrypt.command.d.ts.map +1 -0
- package/dist/commands/encrypt.command.js +42 -0
- package/dist/commands/encrypt.command.js.map +1 -0
- package/dist/commands/generate.command.d.ts +3 -0
- package/dist/commands/generate.command.d.ts.map +1 -0
- package/dist/commands/generate.command.js +67 -0
- package/dist/commands/generate.command.js.map +1 -0
- package/dist/commands/help.command.d.ts +3 -0
- package/dist/commands/help.command.d.ts.map +1 -0
- package/dist/commands/help.command.js +204 -0
- package/dist/commands/help.command.js.map +1 -0
- package/dist/commands/index.d.ts +12 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +27 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/reformat.command.d.ts +3 -0
- package/dist/commands/reformat.command.d.ts.map +1 -0
- package/dist/commands/reformat.command.js +57 -0
- package/dist/commands/reformat.command.js.map +1 -0
- package/dist/commands/revoke.command.d.ts +3 -0
- package/dist/commands/revoke.command.d.ts.map +1 -0
- package/dist/commands/revoke.command.js +41 -0
- package/dist/commands/revoke.command.js.map +1 -0
- package/dist/commands/session.command.d.ts +3 -0
- package/dist/commands/session.command.d.ts.map +1 -0
- package/dist/commands/session.command.js +43 -0
- package/dist/commands/session.command.js.map +1 -0
- package/dist/commands/sign.command.d.ts +3 -0
- package/dist/commands/sign.command.d.ts.map +1 -0
- package/dist/commands/sign.command.js +50 -0
- package/dist/commands/sign.command.js.map +1 -0
- package/dist/commands/verify.command.d.ts +3 -0
- package/dist/commands/verify.command.d.ts.map +1 -0
- package/dist/commands/verify.command.js +43 -0
- package/dist/commands/verify.command.js.map +1 -0
- package/dist/constants/en.d.ts +90 -0
- package/dist/constants/en.d.ts.map +1 -0
- package/dist/constants/en.js +93 -0
- package/dist/constants/en.js.map +1 -0
- package/dist/constants/fr.d.ts +27 -0
- package/dist/constants/fr.d.ts.map +1 -0
- package/dist/constants/fr.js +30 -0
- package/dist/constants/fr.js.map +1 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +46 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/helpers/banner.d.ts +2 -0
- package/dist/helpers/banner.d.ts.map +1 -0
- package/dist/helpers/banner.js +20 -0
- package/dist/helpers/banner.js.map +1 -0
- package/dist/key/key.d.ts +17 -0
- package/dist/key/key.d.ts.map +1 -0
- package/dist/key/key.js +19 -0
- package/dist/key/key.js.map +1 -0
- package/dist/key/rsa-reformat.cert +1 -0
- package/dist/key/rsa-reformat.key +1 -0
- package/dist/key/rsa-reformat.pub +1 -0
- package/dist/key/rsa-revoke.key +1 -0
- package/dist/key/rsa-revoke.pub +1 -0
- package/dist/key/rsa.cert +1 -0
- package/dist/key/rsa.key +1 -0
- package/dist/key/rsa.pub +1 -0
- package/dist/package.json +129 -0
- package/dist/utils/version.utils.d.ts +2 -0
- package/dist/utils/version.utils.d.ts.map +1 -0
- package/dist/utils/version.utils.js +18 -0
- package/dist/utils/version.utils.js.map +1 -0
- package/dist/utils/write.utils.d.ts +4 -0
- package/dist/utils/write.utils.d.ts.map +1 -0
- package/dist/utils/write.utils.js +16 -0
- package/dist/utils/write.utils.js.map +1 -0
- package/package.json +129 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const crypto_lib_1 = __importDefault(require("@sebastienrousseau/crypto-lib"));
|
|
7
|
+
const prompts_1 = __importDefault(require("prompts"));
|
|
8
|
+
const handleReformat = async () => {
|
|
9
|
+
const responseReformat = await (0, prompts_1.default)([
|
|
10
|
+
{
|
|
11
|
+
type: "text",
|
|
12
|
+
name: "email",
|
|
13
|
+
message: "Provide an email address",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "text",
|
|
17
|
+
name: "expiration",
|
|
18
|
+
message: "Provide an expiration date",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "text",
|
|
22
|
+
name: "name",
|
|
23
|
+
message: "Provide a first and last name",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: "password",
|
|
27
|
+
name: "passphrase",
|
|
28
|
+
message: "Provide a passphrase",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: "text",
|
|
32
|
+
name: "publicKey",
|
|
33
|
+
message: "Provide a public key in base64 format",
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
36
|
+
console.log(responseReformat);
|
|
37
|
+
const data = {
|
|
38
|
+
date: new Date(),
|
|
39
|
+
email: responseReformat.email,
|
|
40
|
+
expiration: responseReformat.expiration,
|
|
41
|
+
name: responseReformat.name,
|
|
42
|
+
passphrase: responseReformat.passphrase,
|
|
43
|
+
publicKey: responseReformat.publicKey,
|
|
44
|
+
};
|
|
45
|
+
if (responseReformat.email === "" ||
|
|
46
|
+
responseReformat.expiration === "" ||
|
|
47
|
+
responseReformat.name === "" ||
|
|
48
|
+
responseReformat.passphrase === "" ||
|
|
49
|
+
responseReformat.publicKey === "") {
|
|
50
|
+
console.error("\nđ You must provide a value for each of the properties.\n");
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
await crypto_lib_1.default.reformat(data);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.default = handleReformat;
|
|
57
|
+
//# sourceMappingURL=reformat.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reformat.command.js","sourceRoot":"","sources":["../../src/commands/reformat.command.ts"],"names":[],"mappings":";;;;;AAAA,+EAAqD;AACrD,sDAA8B;AAE9B,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;IAChC,MAAM,gBAAgB,GAAG,MAAM,IAAA,iBAAO,EAAC;QACrC;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,0BAA0B;SACpC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,4BAA4B;SACtC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,+BAA+B;SACzC;QACD;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,sBAAsB;SAChC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,uCAAuC;SACjD;KACF,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAE9B,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,IAAI,IAAI,EAAE;QAChB,KAAK,EAAE,gBAAgB,CAAC,KAAK;QAC7B,UAAU,EAAE,gBAAgB,CAAC,UAAU;QACvC,IAAI,EAAE,gBAAgB,CAAC,IAAI;QAC3B,UAAU,EAAE,gBAAgB,CAAC,UAAU;QACvC,SAAS,EAAE,gBAAgB,CAAC,SAAS;KACtC,CAAC;IAEF,IACE,gBAAgB,CAAC,KAAK,KAAK,EAAE;QAC7B,gBAAgB,CAAC,UAAU,KAAK,EAAE;QAClC,gBAAgB,CAAC,IAAI,KAAK,EAAE;QAC5B,gBAAgB,CAAC,UAAU,KAAK,EAAE;QAClC,gBAAgB,CAAC,SAAS,KAAK,EAAE,EACjC;QACA,OAAO,CAAC,KAAK,CACX,6DAA6D,CAC9D,CAAC;KACH;SAAM;QAEL,MAAM,oBAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KAC/B;AACH,CAAC,CAAC;AACF,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revoke.command.d.ts","sourceRoot":"","sources":["../../src/commands/revoke.command.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,qBAmCjB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const crypto_lib_1 = __importDefault(require("@sebastienrousseau/crypto-lib"));
|
|
7
|
+
const prompts_1 = __importDefault(require("prompts"));
|
|
8
|
+
const handleRevoke = async () => {
|
|
9
|
+
const responseRevoke = await (0, prompts_1.default)([
|
|
10
|
+
{
|
|
11
|
+
type: "password",
|
|
12
|
+
name: "passphrase",
|
|
13
|
+
message: "Provide a passphrase",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "number",
|
|
17
|
+
name: "flag",
|
|
18
|
+
message: "Provide a flag (optional)",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "text",
|
|
22
|
+
name: "reason",
|
|
23
|
+
message: "Provide a reason for revocation (optional)",
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
26
|
+
console.log(responseRevoke);
|
|
27
|
+
const data = {
|
|
28
|
+
date: new Date(),
|
|
29
|
+
passphrase: responseRevoke.passphrase,
|
|
30
|
+
flag: responseRevoke.flag,
|
|
31
|
+
reason: responseRevoke.reason,
|
|
32
|
+
};
|
|
33
|
+
if (responseRevoke.passphrase === "") {
|
|
34
|
+
console.error("\nđ You must provide a value for each of the properties.\n");
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
await crypto_lib_1.default.revoke(data);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.default = handleRevoke;
|
|
41
|
+
//# sourceMappingURL=revoke.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revoke.command.js","sourceRoot":"","sources":["../../src/commands/revoke.command.ts"],"names":[],"mappings":";;;;;AAAA,+EAAmD;AACnD,sDAA8B;AAE9B,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;IAC9B,MAAM,cAAc,GAAG,MAAM,IAAA,iBAAO,EAAC;QACnC;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,sBAAsB;SAChC;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,2BAA2B;SACrC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,4CAA4C;SACtD;KACF,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAE5B,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,IAAI,IAAI,EAAE;QAChB,UAAU,EAAE,cAAc,CAAC,UAAU;QACrC,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,MAAM,EAAE,cAAc,CAAC,MAAM;KAC9B,CAAC;IAEF,IAAI,cAAc,CAAC,UAAU,KAAK,EAAE,EAAE;QACpC,OAAO,CAAC,KAAK,CACX,6DAA6D,CAC9D,CAAC;KACH;SAAM;QAEL,MAAM,oBAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC3B;AACH,CAAC,CAAC;AACF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.command.d.ts","sourceRoot":"","sources":["../../src/commands/session.command.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,aAAa,qBAsClB,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const crypto_lib_1 = __importDefault(require("@sebastienrousseau/crypto-lib"));
|
|
7
|
+
const prompts_1 = __importDefault(require("prompts"));
|
|
8
|
+
const handleSession = async () => {
|
|
9
|
+
const responseSession = await (0, prompts_1.default)([
|
|
10
|
+
{
|
|
11
|
+
type: "text",
|
|
12
|
+
name: "email",
|
|
13
|
+
message: "Provide an email address",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "text",
|
|
17
|
+
name: "name",
|
|
18
|
+
message: "Provide a first and last name",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "text",
|
|
22
|
+
name: "publicKey",
|
|
23
|
+
message: "Provide a public key in base64 format",
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
26
|
+
console.log(responseSession);
|
|
27
|
+
const data = {
|
|
28
|
+
email: responseSession.email,
|
|
29
|
+
name: responseSession.name,
|
|
30
|
+
publicKey: responseSession.publicKey,
|
|
31
|
+
};
|
|
32
|
+
if (responseSession.email === "" ||
|
|
33
|
+
responseSession.name === "" ||
|
|
34
|
+
responseSession.publicKey === "") {
|
|
35
|
+
console.error("\nđ You must provide a value for each of the properties.\n");
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log(data);
|
|
39
|
+
await crypto_lib_1.default.session(data);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.default = handleSession;
|
|
43
|
+
//# sourceMappingURL=session.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.command.js","sourceRoot":"","sources":["../../src/commands/session.command.ts"],"names":[],"mappings":";;;;;AAAA,+EAAoD;AACpD,sDAA8B;AAE9B,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;IAC/B,MAAM,eAAe,GAAG,MAAM,IAAA,iBAAO,EAAC;QACpC;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,0BAA0B;SACpC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,+BAA+B;SACzC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,uCAAuC;SACjD;KACF,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAE7B,MAAM,IAAI,GAAG;QACX,KAAK,EAAE,eAAe,CAAC,KAAK;QAC5B,IAAI,EAAE,eAAe,CAAC,IAAI;QAC1B,SAAS,EAAE,eAAe,CAAC,SAAS;KACrC,CAAC;IAEF,IACE,eAAe,CAAC,KAAK,KAAK,EAAE;QAC5B,eAAe,CAAC,IAAI,KAAK,EAAE;QAC3B,eAAe,CAAC,SAAS,KAAK,EAAE,EAChC;QACA,OAAO,CAAC,KAAK,CACX,6DAA6D,CAC9D,CAAC;KACH;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,MAAM,oBAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7B;AACH,CAAC,CAAC;AACF,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign.command.d.ts","sourceRoot":"","sources":["../../src/commands/sign.command.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,UAAU,qBA+Cf,CAAC;AACF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const crypto_lib_1 = __importDefault(require("@sebastienrousseau/crypto-lib"));
|
|
7
|
+
const prompts_1 = __importDefault(require("prompts"));
|
|
8
|
+
const handleSign = async () => {
|
|
9
|
+
const responseSign = await (0, prompts_1.default)([
|
|
10
|
+
{
|
|
11
|
+
type: "password",
|
|
12
|
+
name: "passphrase",
|
|
13
|
+
message: "Provide a passphrase",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "text",
|
|
17
|
+
name: "message",
|
|
18
|
+
message: "Provide a message to encrypt",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "confirm",
|
|
22
|
+
name: "detached",
|
|
23
|
+
message: "Provide true or false",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: "text",
|
|
27
|
+
name: "publicKey",
|
|
28
|
+
message: "Provide a public key in base64 format",
|
|
29
|
+
},
|
|
30
|
+
]);
|
|
31
|
+
console.log(responseSign);
|
|
32
|
+
const data = {
|
|
33
|
+
date: new Date(),
|
|
34
|
+
passphrase: responseSign.passphrase,
|
|
35
|
+
message: responseSign.message,
|
|
36
|
+
detached: responseSign.detached,
|
|
37
|
+
publicKey: responseSign.publicKey,
|
|
38
|
+
};
|
|
39
|
+
if (responseSign.passphrase === "" ||
|
|
40
|
+
responseSign.message === "" ||
|
|
41
|
+
responseSign.detached === "" ||
|
|
42
|
+
responseSign.publicKey === "") {
|
|
43
|
+
console.error("\nđ You must provide a value for each of the properties.\n");
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
await crypto_lib_1.default.sign(data);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.default = handleSign;
|
|
50
|
+
//# sourceMappingURL=sign.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign.command.js","sourceRoot":"","sources":["../../src/commands/sign.command.ts"],"names":[],"mappings":";;;;;AAAA,+EAAiD;AACjD,sDAA8B;AAE9B,MAAM,UAAU,GAAG,KAAK,IAAI,EAAE;IAC5B,MAAM,YAAY,GAAG,MAAM,IAAA,iBAAO,EAAC;QACjC;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,sBAAsB;SAChC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,8BAA8B;SACxC;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,uBAAuB;SACjC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,uCAAuC;SACjD;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAE1B,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,IAAI,IAAI,EAAE;QAChB,UAAU,EAAE,YAAY,CAAC,UAAU;QACnC,OAAO,EAAE,YAAY,CAAC,OAAO;QAC7B,QAAQ,EAAE,YAAY,CAAC,QAAQ;QAC/B,SAAS,EAAE,YAAY,CAAC,SAAS;KAClC,CAAC;IAEF,IACE,YAAY,CAAC,UAAU,KAAK,EAAE;QAC9B,YAAY,CAAC,OAAO,KAAK,EAAE;QAC3B,YAAY,CAAC,QAAQ,KAAK,EAAE;QAC5B,YAAY,CAAC,SAAS,KAAK,EAAE,EAC7B;QACA,OAAO,CAAC,KAAK,CACX,6DAA6D,CAC9D,CAAC;KACH;SAAM;QAEL,MAAM,oBAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACvB;AACH,CAAC,CAAC;AACF,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.command.d.ts","sourceRoot":"","sources":["../../src/commands/verify.command.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,qBAuCjB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const crypto_lib_1 = __importDefault(require("@sebastienrousseau/crypto-lib"));
|
|
7
|
+
const prompts_1 = __importDefault(require("prompts"));
|
|
8
|
+
const handleVerify = async () => {
|
|
9
|
+
const responseVerify = await (0, prompts_1.default)([
|
|
10
|
+
{
|
|
11
|
+
type: "text",
|
|
12
|
+
name: "message",
|
|
13
|
+
message: "Provide a message to encrypt",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "confirm",
|
|
17
|
+
name: "detached",
|
|
18
|
+
message: "Provide true or false",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "text",
|
|
22
|
+
name: "publicKey",
|
|
23
|
+
message: "Provide a public key in base64 format",
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
26
|
+
console.log(responseVerify);
|
|
27
|
+
const data = {
|
|
28
|
+
message: responseVerify.message,
|
|
29
|
+
detached: responseVerify.detached,
|
|
30
|
+
publicKey: responseVerify.publicKey,
|
|
31
|
+
};
|
|
32
|
+
if (responseVerify.message === "" ||
|
|
33
|
+
responseVerify.detached === "" ||
|
|
34
|
+
responseVerify.publicKey === "") {
|
|
35
|
+
console.error("\nđ You must provide a value for each of the properties.\n");
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log(data);
|
|
39
|
+
await crypto_lib_1.default.verify(data);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.default = handleVerify;
|
|
43
|
+
//# sourceMappingURL=verify.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.command.js","sourceRoot":"","sources":["../../src/commands/verify.command.ts"],"names":[],"mappings":";;;;;AAAA,+EAAmD;AACnD,sDAA8B;AAE9B,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;IAC9B,MAAM,cAAc,GAAG,MAAM,IAAA,iBAAO,EAAC;QACnC;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,8BAA8B;SACxC;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,uBAAuB;SACjC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,uCAAuC;SACjD;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAE5B,MAAM,IAAI,GAAG;QACX,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,QAAQ,EAAE,cAAc,CAAC,QAAQ;QACjC,SAAS,EAAE,cAAc,CAAC,SAAS;KACpC,CAAC;IAEF,IACE,cAAc,CAAC,OAAO,KAAK,EAAE;QAC7B,cAAc,CAAC,QAAQ,KAAK,EAAE;QAC9B,cAAc,CAAC,SAAS,KAAK,EAAE,EAC/B;QACA,OAAO,CAAC,KAAK,CACX,6DAA6D,CAC9D,CAAC;KACH;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,MAAM,oBAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC3B;AACH,CAAC,CAAC;AACF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare const translations: {
|
|
2
|
+
readonly CLI_TITLE: "đ Crypto CLI";
|
|
3
|
+
readonly CLI_DESCRIPTION: "Crypto CLI is a simple, yet powerful, command line interface that can be used to perform common cryptographic operations from the command prompt or terminal.";
|
|
4
|
+
readonly CLI_FN_1_TTL: "Generate";
|
|
5
|
+
readonly CLI_FN_1_DES: "Generates a new OpenPGP key pair. Supports RSA and ECC keys.";
|
|
6
|
+
readonly CLI_FN_1_LG_DES: "đ Select this option to get help on the generate command.";
|
|
7
|
+
readonly CLI_FN_2_TTL: "Encrypt";
|
|
8
|
+
readonly CLI_FN_2_DES: "Encrypts a message.";
|
|
9
|
+
readonly CLI_FN_2_LG_DES: "đ Select this option to get help on the encrypt command.";
|
|
10
|
+
readonly CLI_FN_3_TTL: "Decrypt";
|
|
11
|
+
readonly CLI_FN_3_DES: "Decrypts a message.";
|
|
12
|
+
readonly CLI_FN_3_LG_DES: "đ Select this option to get help on the decrypt command.";
|
|
13
|
+
readonly CLI_FN_4_TTL: "Reformat";
|
|
14
|
+
readonly CLI_FN_4_DES: "Reformats signature packets for a key.";
|
|
15
|
+
readonly CLI_FN_4_LG_DES: "đ Select this option to get help on the reformat command.";
|
|
16
|
+
readonly CLI_FN_5_TTL: "Revoke";
|
|
17
|
+
readonly CLI_FN_5_DES: "Revokes a key.";
|
|
18
|
+
readonly CLI_FN_5_LG_DES: "đ Select this option to get help on the revoke command.";
|
|
19
|
+
readonly CLI_FN_6_TTL: "Session";
|
|
20
|
+
readonly CLI_FN_6_DES: "Generate a new session key object.";
|
|
21
|
+
readonly CLI_FN_6_LG_DES: "đ Select this option to get help on the session command.";
|
|
22
|
+
readonly CLI_FN_7_TTL: "Sign";
|
|
23
|
+
readonly CLI_FN_7_DES: "Signs a message.";
|
|
24
|
+
readonly CLI_FN_7_LG_DES: "đ Select this option to get help on the sign command.";
|
|
25
|
+
readonly CLI_FN_8_TTL: "Verify";
|
|
26
|
+
readonly CLI_FN_8_DES: "Verifies signatures of cleartext signed message.";
|
|
27
|
+
readonly CLI_FN_8_LG_DES: "đ Select this option to get help on the verify command.";
|
|
28
|
+
readonly CLI_FN_9_TTL: "Help";
|
|
29
|
+
readonly CLI_FN_9_DES: "Get help on a command.";
|
|
30
|
+
readonly CLI_FN_9_LG_DES: "";
|
|
31
|
+
readonly CLI_HDL_1_DES: "We need you to provide us with the following information:";
|
|
32
|
+
readonly PROMPT_SELECT_TTL: "Selection";
|
|
33
|
+
readonly PROMPT_SELECT_DES: "Select a function to execute.";
|
|
34
|
+
readonly PROMPT_SELECT_DES_HLP: "Let us help you on the Crypto Command Line Interface (CLI). Please select a command to learn more about.";
|
|
35
|
+
readonly PROMPT_HLP_DEC_DES: "This function decrypts a message with the user's private key, a session key or a password. One of decryptionKeys, session keys or passwords must be specified (passing a combination of these options is not supported).";
|
|
36
|
+
readonly PROMPT_HLP_DEC_USAGE: "Usage: decrypt [options]";
|
|
37
|
+
readonly PROMPT_HLP_DEC_OPTIONS: "Options:";
|
|
38
|
+
readonly PROMPT_HLP_DEC_OPT_1: " <encryptedMessage> - The message object with the encrypted data.";
|
|
39
|
+
readonly PROMPT_HLP_DEC_OPT_2: " <passphrase> - Passphrase / Passwords to decrypt the message";
|
|
40
|
+
readonly PROMPT_HLP_DEC_OPT_3: " <publicKey> - Public key enumeration base64 encoded.";
|
|
41
|
+
readonly PROMPT_HLP_ENC_DES: "This function encrypts a message using public keys, passwords or both at once. At least one of encryptionKeys or passwords must be specified. If signing keys are specified, those will be used to sign the message.";
|
|
42
|
+
readonly PROMPT_HLP_ENC_USAGE: "Usage: encrypt [options]";
|
|
43
|
+
readonly PROMPT_HLP_ENC_OPTIONS: "Options:";
|
|
44
|
+
readonly PROMPT_HLP_ENC_OPT_1: " <message> - The message to be encrypted.";
|
|
45
|
+
readonly PROMPT_HLP_ENC_OPT_2: " <passphrase> - Passphrase to encrypt the message.";
|
|
46
|
+
readonly PROMPT_HLP_ENC_OPT_3: " <publicKey> - Public key enumeration base64 encoded.";
|
|
47
|
+
readonly PROMPT_HLP_GEN_DES: "This function generates a new OpenPGP key pair. Supports RSA and ECC keys. By default, primary and subkeys will be of same type. The generated primary key will have signing capabilities. By default, one subkey with encryption capabilities is also generated.";
|
|
48
|
+
readonly PROMPT_HLP_GEN_USAGE: "Usage: generate [options]";
|
|
49
|
+
readonly PROMPT_HLP_GEN_OPTIONS: "Options:";
|
|
50
|
+
readonly PROMPT_HLP_GEN_OPT_1: " <name> - Name of the user.";
|
|
51
|
+
readonly PROMPT_HLP_GEN_OPT_2: " <email> - Email of the user.";
|
|
52
|
+
readonly PROMPT_HLP_GEN_OPT_3: " <passphrase> - The passphrase used to encrypt the generated private key. If omitted or empty, the key won't be encrypted.";
|
|
53
|
+
readonly PROMPT_HLP_GEN_OPT_4: " <type> - The primary key algorithm type: ECC (default) or RSA.";
|
|
54
|
+
readonly PROMPT_HLP_GEN_OPT_5: " <curve> - Elliptic curve for ECC keys: curve25519 (default), p256, p384, p521, secp256k1, brainpoolP256r1, brainpoolP384r1, or brainpoolP512r1.";
|
|
55
|
+
readonly PROMPT_HLP_GEN_OPT_6: " <rsaBits> - Number of bits for RSA keys.";
|
|
56
|
+
readonly PROMPT_HLP_GEN_OPT_7: " <keyExpirationTime> - Number of seconds from the key creation time after which the key expires.";
|
|
57
|
+
readonly PROMPT_HLP_GEN_OPT_8: " <format> - Format of the output keys: 'armored' | 'binary' | 'object'";
|
|
58
|
+
readonly PROMPT_HLP_REF_DES: "This function reformats signature packets for a key and rewraps key object.";
|
|
59
|
+
readonly PROMPT_HLP_REF_USAGE: "Usage: reformat [options]";
|
|
60
|
+
readonly PROMPT_HLP_REF_OPTIONS: "Options:";
|
|
61
|
+
readonly PROMPT_HLP_REF_OPT_1: " <email> - Email of the user.";
|
|
62
|
+
readonly PROMPT_HLP_REF_OPT_2: " <expirationTime> - Number of seconds from the key creation time after which the key expires.";
|
|
63
|
+
readonly PROMPT_HLP_REF_OPT_3: " <name> - Name of the user.";
|
|
64
|
+
readonly PROMPT_HLP_REF_OPT_4: " <passphrase> - The passphrase used to encrypt the reformatted private key. If omitted or empty, the key won't be encrypted.";
|
|
65
|
+
readonly PROMPT_HLP_REF_OPT_5: " <publicKey> - Public key enumeration base64 encoded.";
|
|
66
|
+
readonly PROMPT_HLP_RVK_DES: "This function revokes a key. Requires either a private key or a revocation certificate. If a revocation certificate is passed, the reasonForRevocation parameter will be ignored.";
|
|
67
|
+
readonly PROMPT_HLP_RVK_USAGE: "Usage: revoke [options]";
|
|
68
|
+
readonly PROMPT_HLP_RVK_OPTIONS: "Options:";
|
|
69
|
+
readonly PROMPT_HLP_RVK_OPT_1: " <flags> - Flag indicating the reason for revocation.";
|
|
70
|
+
readonly PROMPT_HLP_RVK_OPT_2: " <passphrase> - Passphrase to decrypt the private key.";
|
|
71
|
+
readonly PROMPT_HLP_RVK_OPT_3: " <reasonForRevocation> - Reason for revocation.";
|
|
72
|
+
readonly PROMPT_HLP_SES_DES: "This function generates a new session key object, taking the algorithm preferences of the passed public keys into account.";
|
|
73
|
+
readonly PROMPT_HLP_SES_USAGE: "Usage: session [options]";
|
|
74
|
+
readonly PROMPT_HLP_SES_OPT_1: " <name> - Name of the user.";
|
|
75
|
+
readonly PROMPT_HLP_SES_OPT_2: " <publicKey> - Public key enumeration base64 encoded.";
|
|
76
|
+
readonly PROMPT_HLP_SGN_DES: "This function signs a message.";
|
|
77
|
+
readonly PROMPT_HLP_SGN_USAGE: "Usage: sign [options]";
|
|
78
|
+
readonly PROMPT_HLP_SGN_OPT_1: " <passphrase> - Passphrase to sign the message.";
|
|
79
|
+
readonly PROMPT_HLP_SGN_OPT_2: " <message> - The message to be signed.";
|
|
80
|
+
readonly PROMPT_HLP_SGN_OPT_3: " <detach> - If true, the signature is detached. If false, the signature is embedded.";
|
|
81
|
+
readonly PROMPT_HLP_SGN_OPT_4: " <publicKey> - Public key enumeration base64 encoded.";
|
|
82
|
+
readonly PROMPT_HLP_SGN_OPT_5: " <privateKey> - Private key enumeration base64 encoded.";
|
|
83
|
+
readonly PROMPT_HLP_VRF_DES: "This function verifies signatures of cleartext signed message.";
|
|
84
|
+
readonly PROMPT_HLP_VRF_USAGE: "Usage: verify [options]";
|
|
85
|
+
readonly PROMPT_HLP_VRF_OPT_1: " <message> - The message to be verified.";
|
|
86
|
+
readonly PROMPT_HLP_VRF_OPT_2: " <publicKey> - Public key enumeration base64 encoded.";
|
|
87
|
+
readonly CLI_ERR_1: "đ You must select a command.";
|
|
88
|
+
readonly CLI_ERR_2: "đ You must select a valid option.";
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/constants/en.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFf,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.translations = void 0;
|
|
4
|
+
exports.translations = {
|
|
5
|
+
CLI_TITLE: 'đ Crypto CLI',
|
|
6
|
+
CLI_DESCRIPTION: 'Crypto CLI is a simple, yet powerful, command line interface that can be used to perform common cryptographic operations from the command prompt or terminal.',
|
|
7
|
+
CLI_FN_1_TTL: 'Generate',
|
|
8
|
+
CLI_FN_1_DES: 'Generates a new OpenPGP key pair. Supports RSA and ECC keys.',
|
|
9
|
+
CLI_FN_1_LG_DES: 'đ Select this option to get help on the generate command.',
|
|
10
|
+
CLI_FN_2_TTL: 'Encrypt',
|
|
11
|
+
CLI_FN_2_DES: 'Encrypts a message.',
|
|
12
|
+
CLI_FN_2_LG_DES: 'đ Select this option to get help on the encrypt command.',
|
|
13
|
+
CLI_FN_3_TTL: 'Decrypt',
|
|
14
|
+
CLI_FN_3_DES: 'Decrypts a message.',
|
|
15
|
+
CLI_FN_3_LG_DES: 'đ Select this option to get help on the decrypt command.',
|
|
16
|
+
CLI_FN_4_TTL: 'Reformat',
|
|
17
|
+
CLI_FN_4_DES: 'Reformats signature packets for a key.',
|
|
18
|
+
CLI_FN_4_LG_DES: 'đ Select this option to get help on the reformat command.',
|
|
19
|
+
CLI_FN_5_TTL: 'Revoke',
|
|
20
|
+
CLI_FN_5_DES: 'Revokes a key.',
|
|
21
|
+
CLI_FN_5_LG_DES: 'đ Select this option to get help on the revoke command.',
|
|
22
|
+
CLI_FN_6_TTL: 'Session',
|
|
23
|
+
CLI_FN_6_DES: 'Generate a new session key object.',
|
|
24
|
+
CLI_FN_6_LG_DES: 'đ Select this option to get help on the session command.',
|
|
25
|
+
CLI_FN_7_TTL: 'Sign',
|
|
26
|
+
CLI_FN_7_DES: 'Signs a message.',
|
|
27
|
+
CLI_FN_7_LG_DES: 'đ Select this option to get help on the sign command.',
|
|
28
|
+
CLI_FN_8_TTL: 'Verify',
|
|
29
|
+
CLI_FN_8_DES: 'Verifies signatures of cleartext signed message.',
|
|
30
|
+
CLI_FN_8_LG_DES: 'đ Select this option to get help on the verify command.',
|
|
31
|
+
CLI_FN_9_TTL: 'Help',
|
|
32
|
+
CLI_FN_9_DES: 'Get help on a command.',
|
|
33
|
+
CLI_FN_9_LG_DES: '',
|
|
34
|
+
CLI_HDL_1_DES: 'We need you to provide us with the following information:',
|
|
35
|
+
PROMPT_SELECT_TTL: 'Selection',
|
|
36
|
+
PROMPT_SELECT_DES: 'Select a function to execute.',
|
|
37
|
+
PROMPT_SELECT_DES_HLP: 'Let us help you on the Crypto Command Line Interface (CLI). Please select a command to learn more about.',
|
|
38
|
+
PROMPT_HLP_DEC_DES: 'This function decrypts a message with the user\'s private key, a session key or a password. One of decryptionKeys, session keys or passwords must be specified (passing a combination of these options is not supported).',
|
|
39
|
+
PROMPT_HLP_DEC_USAGE: 'Usage: decrypt [options]',
|
|
40
|
+
PROMPT_HLP_DEC_OPTIONS: 'Options:',
|
|
41
|
+
PROMPT_HLP_DEC_OPT_1: ' <encryptedMessage> - The message object with the encrypted data.',
|
|
42
|
+
PROMPT_HLP_DEC_OPT_2: ' <passphrase> - Passphrase / Passwords to decrypt the message',
|
|
43
|
+
PROMPT_HLP_DEC_OPT_3: ' <publicKey> - Public key enumeration base64 encoded.',
|
|
44
|
+
PROMPT_HLP_ENC_DES: 'This function encrypts a message using public keys, passwords or both at once. At least one of encryptionKeys or passwords must be specified. If signing keys are specified, those will be used to sign the message.',
|
|
45
|
+
PROMPT_HLP_ENC_USAGE: 'Usage: encrypt [options]',
|
|
46
|
+
PROMPT_HLP_ENC_OPTIONS: 'Options:',
|
|
47
|
+
PROMPT_HLP_ENC_OPT_1: ' <message> - The message to be encrypted.',
|
|
48
|
+
PROMPT_HLP_ENC_OPT_2: ' <passphrase> - Passphrase to encrypt the message.',
|
|
49
|
+
PROMPT_HLP_ENC_OPT_3: ' <publicKey> - Public key enumeration base64 encoded.',
|
|
50
|
+
PROMPT_HLP_GEN_DES: 'This function generates a new OpenPGP key pair. Supports RSA and ECC keys. By default, primary and subkeys will be of same type. The generated primary key will have signing capabilities. By default, one subkey with encryption capabilities is also generated.',
|
|
51
|
+
PROMPT_HLP_GEN_USAGE: 'Usage: generate [options]',
|
|
52
|
+
PROMPT_HLP_GEN_OPTIONS: 'Options:',
|
|
53
|
+
PROMPT_HLP_GEN_OPT_1: ' <name> - Name of the user.',
|
|
54
|
+
PROMPT_HLP_GEN_OPT_2: ' <email> - Email of the user.',
|
|
55
|
+
PROMPT_HLP_GEN_OPT_3: ' <passphrase> - The passphrase used to encrypt the generated private key. If omitted or empty, the key won\'t be encrypted.',
|
|
56
|
+
PROMPT_HLP_GEN_OPT_4: ' <type> - The primary key algorithm type: ECC (default) or RSA.',
|
|
57
|
+
PROMPT_HLP_GEN_OPT_5: ' <curve> - Elliptic curve for ECC keys: curve25519 (default), p256, p384, p521, secp256k1, brainpoolP256r1, brainpoolP384r1, or brainpoolP512r1.',
|
|
58
|
+
PROMPT_HLP_GEN_OPT_6: ' <rsaBits> - Number of bits for RSA keys.',
|
|
59
|
+
PROMPT_HLP_GEN_OPT_7: ' <keyExpirationTime> - Number of seconds from the key creation time after which the key expires.',
|
|
60
|
+
PROMPT_HLP_GEN_OPT_8: ' <format> - Format of the output keys: \'armored\' | \'binary\' | \'object\'',
|
|
61
|
+
PROMPT_HLP_REF_DES: 'This function reformats signature packets for a key and rewraps key object.',
|
|
62
|
+
PROMPT_HLP_REF_USAGE: 'Usage: reformat [options]',
|
|
63
|
+
PROMPT_HLP_REF_OPTIONS: 'Options:',
|
|
64
|
+
PROMPT_HLP_REF_OPT_1: ' <email> - Email of the user.',
|
|
65
|
+
PROMPT_HLP_REF_OPT_2: ' <expirationTime> - Number of seconds from the key creation time after which the key expires.',
|
|
66
|
+
PROMPT_HLP_REF_OPT_3: ' <name> - Name of the user.',
|
|
67
|
+
PROMPT_HLP_REF_OPT_4: ' <passphrase> - The passphrase used to encrypt the reformatted private key. If omitted or empty, the key won\'t be encrypted.',
|
|
68
|
+
PROMPT_HLP_REF_OPT_5: ' <publicKey> - Public key enumeration base64 encoded.',
|
|
69
|
+
PROMPT_HLP_RVK_DES: 'This function revokes a key. Requires either a private key or a revocation certificate. If a revocation certificate is passed, the reasonForRevocation parameter will be ignored.',
|
|
70
|
+
PROMPT_HLP_RVK_USAGE: 'Usage: revoke [options]',
|
|
71
|
+
PROMPT_HLP_RVK_OPTIONS: 'Options:',
|
|
72
|
+
PROMPT_HLP_RVK_OPT_1: ' <flags> - Flag indicating the reason for revocation.',
|
|
73
|
+
PROMPT_HLP_RVK_OPT_2: ' <passphrase> - Passphrase to decrypt the private key.',
|
|
74
|
+
PROMPT_HLP_RVK_OPT_3: ' <reasonForRevocation> - Reason for revocation.',
|
|
75
|
+
PROMPT_HLP_SES_DES: 'This function generates a new session key object, taking the algorithm preferences of the passed public keys into account.',
|
|
76
|
+
PROMPT_HLP_SES_USAGE: 'Usage: session [options]',
|
|
77
|
+
PROMPT_HLP_SES_OPT_1: ' <name> - Name of the user.',
|
|
78
|
+
PROMPT_HLP_SES_OPT_2: ' <publicKey> - Public key enumeration base64 encoded.',
|
|
79
|
+
PROMPT_HLP_SGN_DES: 'This function signs a message.',
|
|
80
|
+
PROMPT_HLP_SGN_USAGE: 'Usage: sign [options]',
|
|
81
|
+
PROMPT_HLP_SGN_OPT_1: ' <passphrase> - Passphrase to sign the message.',
|
|
82
|
+
PROMPT_HLP_SGN_OPT_2: ' <message> - The message to be signed.',
|
|
83
|
+
PROMPT_HLP_SGN_OPT_3: ' <detach> - If true, the signature is detached. If false, the signature is embedded.',
|
|
84
|
+
PROMPT_HLP_SGN_OPT_4: ' <publicKey> - Public key enumeration base64 encoded.',
|
|
85
|
+
PROMPT_HLP_SGN_OPT_5: ' <privateKey> - Private key enumeration base64 encoded.',
|
|
86
|
+
PROMPT_HLP_VRF_DES: 'This function verifies signatures of cleartext signed message.',
|
|
87
|
+
PROMPT_HLP_VRF_USAGE: 'Usage: verify [options]',
|
|
88
|
+
PROMPT_HLP_VRF_OPT_1: ' <message> - The message to be verified.',
|
|
89
|
+
PROMPT_HLP_VRF_OPT_2: ' <publicKey> - Public key enumeration base64 encoded.',
|
|
90
|
+
CLI_ERR_1: 'đ You must select a command.',
|
|
91
|
+
CLI_ERR_2: 'đ You must select a valid option.',
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/constants/en.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const translations: {
|
|
2
|
+
readonly CLI_TITLE: "đ Crypto CLI";
|
|
3
|
+
readonly CLI_DESCRIPTION: "Crypto CLI est une interface de ligne de commande simple mais puissante qui peut ĂȘtre utilisĂ©e pour effectuer des opĂ©rations cryptographiques courantes Ă partir de l'invite de commande ou du terminal.";
|
|
4
|
+
readonly CLI_FN_1_TTL: "Generate";
|
|
5
|
+
readonly CLI_FN_1_DES: "GénÚre une nouvelle paire de clés OpenPGP. Prend en charge les clés RSA et ECC.";
|
|
6
|
+
readonly CLI_FN_2_TTL: "Encrypt";
|
|
7
|
+
readonly CLI_FN_2_DES: "Crypte un message.";
|
|
8
|
+
readonly CLI_FN_3_TTL: "Decrypt";
|
|
9
|
+
readonly CLI_FN_3_DES: "Déchiffre un message.";
|
|
10
|
+
readonly CLI_FN_4_TTL: "Reformat";
|
|
11
|
+
readonly CLI_FN_4_DES: "Reformate les paquets de signature pour une clé.";
|
|
12
|
+
readonly CLI_FN_5_TTL: "Revoke";
|
|
13
|
+
readonly CLI_FN_5_DES: "Révoque une clé.";
|
|
14
|
+
readonly CLI_FN_6_TTL: "Session";
|
|
15
|
+
readonly CLI_FN_6_DES: "Générez un nouvel objet clé de session.";
|
|
16
|
+
readonly CLI_FN_7_TTL: "Sign";
|
|
17
|
+
readonly CLI_FN_7_DES: "Signe un message.";
|
|
18
|
+
readonly CLI_FN_8_TTL: "Verify";
|
|
19
|
+
readonly CLI_FN_8_DES: "Vérifie les signatures des messages signés en texte clair.";
|
|
20
|
+
readonly CLI_FN_9_TTL: "Help";
|
|
21
|
+
readonly CLI_FN_9_DES: "Obtenir de l'aide sur une commande.";
|
|
22
|
+
readonly CLI_HDL_1_DES: "Nous avons besoin que vous nous fournissiez les informations suivantes :";
|
|
23
|
+
readonly PROMPT_SELECT_TTL: "Selection";
|
|
24
|
+
readonly PROMPT_SELECT_DES: "Sélectionnez une fonction à exécuter.";
|
|
25
|
+
readonly CLI_ERR_1: "đ Vous devez sĂ©lectionner une commande.";
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=fr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/constants/fr.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAyBf,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.translations = void 0;
|
|
4
|
+
exports.translations = {
|
|
5
|
+
CLI_TITLE: 'đ Crypto CLI',
|
|
6
|
+
CLI_DESCRIPTION: 'Crypto CLI est une interface de ligne de commande simple mais puissante qui peut ĂȘtre utilisĂ©e pour effectuer des opĂ©rations cryptographiques courantes Ă partir de l\'invite de commande ou du terminal.',
|
|
7
|
+
CLI_FN_1_TTL: 'Generate',
|
|
8
|
+
CLI_FN_1_DES: 'GénÚre une nouvelle paire de clés OpenPGP. Prend en charge les clés RSA et ECC.',
|
|
9
|
+
CLI_FN_2_TTL: 'Encrypt',
|
|
10
|
+
CLI_FN_2_DES: 'Crypte un message.',
|
|
11
|
+
CLI_FN_3_TTL: 'Decrypt',
|
|
12
|
+
CLI_FN_3_DES: 'Déchiffre un message.',
|
|
13
|
+
CLI_FN_4_TTL: 'Reformat',
|
|
14
|
+
CLI_FN_4_DES: 'Reformate les paquets de signature pour une clé.',
|
|
15
|
+
CLI_FN_5_TTL: 'Revoke',
|
|
16
|
+
CLI_FN_5_DES: 'Révoque une clé.',
|
|
17
|
+
CLI_FN_6_TTL: 'Session',
|
|
18
|
+
CLI_FN_6_DES: 'Générez un nouvel objet clé de session.',
|
|
19
|
+
CLI_FN_7_TTL: 'Sign',
|
|
20
|
+
CLI_FN_7_DES: 'Signe un message.',
|
|
21
|
+
CLI_FN_8_TTL: 'Verify',
|
|
22
|
+
CLI_FN_8_DES: 'Vérifie les signatures des messages signés en texte clair.',
|
|
23
|
+
CLI_FN_9_TTL: 'Help',
|
|
24
|
+
CLI_FN_9_DES: 'Obtenir de l\'aide sur une commande.',
|
|
25
|
+
CLI_HDL_1_DES: 'Nous avons besoin que vous nous fournissiez les informations suivantes :',
|
|
26
|
+
PROMPT_SELECT_TTL: 'Selection',
|
|
27
|
+
PROMPT_SELECT_DES: 'Sélectionnez une fonction à exécuter.',
|
|
28
|
+
CLI_ERR_1: 'đ Vous devez sĂ©lectionner une commande.',
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=fr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.js","sourceRoot":"","sources":["../../src/constants/fr.ts"],"names":[],"mappings":";;;AACa,QAAA,YAAY,GAAG;IACxB,SAAS,EAAS,eAAe;IACjC,eAAe,EAAG,2MAA2M;IAC7N,YAAY,EAAM,UAAU;IAC5B,YAAY,EAAM,iFAAiF;IACnG,YAAY,EAAM,SAAS;IAC3B,YAAY,EAAM,oBAAoB;IACtC,YAAY,EAAM,SAAS;IAC3B,YAAY,EAAM,uBAAuB;IACzC,YAAY,EAAM,UAAU;IAC5B,YAAY,EAAM,kDAAkD;IACpE,YAAY,EAAM,QAAQ;IAC1B,YAAY,EAAM,kBAAkB;IACpC,YAAY,EAAM,SAAS;IAC3B,YAAY,EAAM,yCAAyC;IAC3D,YAAY,EAAM,MAAM;IACxB,YAAY,EAAM,mBAAmB;IACrC,YAAY,EAAM,QAAQ;IAC1B,YAAY,EAAM,4DAA4D;IAC9E,YAAY,EAAM,MAAM;IACxB,YAAY,EAAM,sCAAsC;IACxD,aAAa,EAAK,0EAA0E;IAC5F,iBAAiB,EAAI,WAAW;IAChC,iBAAiB,EAAI,uCAAuC;IAC5D,SAAS,EAAY,0CAA0C;CACzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,MAAM,QAA6D,CAAC;AAC1E,QAAA,IAAI,SAAS,KAAA,CAAC;AAEd,iBAAe,QAAQ,CAAC,IAAI,EAAE,MAAM,iBAWnC;AAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.locale = exports.constants = exports.language = void 0;
|
|
27
|
+
const en = __importStar(require("./en"));
|
|
28
|
+
const fr = __importStar(require("./fr"));
|
|
29
|
+
const locale = Intl.DateTimeFormat().resolvedOptions().locale.slice(0, 2);
|
|
30
|
+
exports.locale = locale;
|
|
31
|
+
let constants;
|
|
32
|
+
exports.constants = constants;
|
|
33
|
+
async function language(data) {
|
|
34
|
+
{
|
|
35
|
+
if (data === "en") {
|
|
36
|
+
console.log("en", data);
|
|
37
|
+
exports.constants = constants = en.translations;
|
|
38
|
+
}
|
|
39
|
+
else if (data === "fr") {
|
|
40
|
+
console.log("fr", data);
|
|
41
|
+
exports.constants = constants = fr.translations;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.language = language;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA2B;AAC3B,yCAA2B;AAE3B,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAgB5C,wBAAM;AAfpC,IAAI,SAAS,CAAC;AAeK,8BAAS;AAb5B,KAAK,UAAU,QAAQ,CAAC,IAAY;IAClC;QACE,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACxB,oBAAA,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC;SAC7B;aACI,IAAI,IAAI,KAAK,IAAI,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACxB,oBAAA,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC;SAC7B;KACF;AACH,CAAC;AAEQ,4BAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/helpers/banner.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,SAAgB,MAAM,iBAQzC,CAAA"}
|