@sebastienrousseau/crypto-cli 0.0.1 → 0.0.7

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.
Files changed (91) hide show
  1. package/README.md +228 -235
  2. package/dist/cli.js +67 -1
  3. package/dist/commands/decrypt.command.d.ts.map +1 -1
  4. package/dist/commands/decrypt.command.js +3 -4
  5. package/dist/commands/encrypt.command.d.ts.map +1 -1
  6. package/dist/commands/encrypt.command.js +2 -3
  7. package/dist/commands/generate.command.d.ts.map +1 -1
  8. package/dist/commands/generate.command.js +24 -25
  9. package/dist/commands/help.command.d.ts.map +1 -1
  10. package/dist/commands/index.d.ts +6 -0
  11. package/dist/commands/index.d.ts.map +1 -1
  12. package/dist/commands/index.js +7 -0
  13. package/dist/commands/modern/cbom.command.d.ts +10 -0
  14. package/dist/commands/modern/cbom.command.d.ts.map +1 -0
  15. package/dist/commands/modern/cbom.command.js +164 -0
  16. package/dist/commands/modern/encrypt.command.d.ts +3 -0
  17. package/dist/commands/modern/encrypt.command.d.ts.map +1 -0
  18. package/dist/commands/modern/encrypt.command.js +125 -0
  19. package/dist/commands/modern/hash.command.d.ts +3 -0
  20. package/dist/commands/modern/hash.command.d.ts.map +1 -0
  21. package/dist/commands/modern/hash.command.js +91 -0
  22. package/dist/commands/modern/index.d.ts +9 -0
  23. package/dist/commands/modern/index.d.ts.map +1 -0
  24. package/dist/commands/modern/index.js +21 -0
  25. package/dist/commands/modern/keygen.command.d.ts +3 -0
  26. package/dist/commands/modern/keygen.command.d.ts.map +1 -0
  27. package/dist/commands/modern/keygen.command.js +113 -0
  28. package/dist/commands/modern/password-hash.command.d.ts +3 -0
  29. package/dist/commands/modern/password-hash.command.d.ts.map +1 -0
  30. package/dist/commands/modern/password-hash.command.js +106 -0
  31. package/dist/commands/modern/sign.command.d.ts +3 -0
  32. package/dist/commands/modern/sign.command.d.ts.map +1 -0
  33. package/dist/commands/modern/sign.command.js +135 -0
  34. package/dist/commands/reformat.command.d.ts.map +1 -1
  35. package/dist/commands/reformat.command.js +2 -3
  36. package/dist/commands/revoke.command.d.ts.map +1 -1
  37. package/dist/commands/revoke.command.js +2 -3
  38. package/dist/commands/session.command.d.ts.map +1 -1
  39. package/dist/commands/session.command.js +2 -3
  40. package/dist/commands/sign.command.d.ts.map +1 -1
  41. package/dist/commands/sign.command.js +2 -3
  42. package/dist/commands/verify.command.d.ts.map +1 -1
  43. package/dist/commands/verify.command.js +12 -13
  44. package/dist/constants/en.d.ts.map +1 -1
  45. package/dist/constants/en.js +87 -87
  46. package/dist/constants/fr.d.ts +1 -1
  47. package/dist/constants/fr.d.ts.map +1 -1
  48. package/dist/constants/fr.js +24 -24
  49. package/dist/constants/index.d.ts +4 -2
  50. package/dist/constants/index.d.ts.map +1 -1
  51. package/dist/constants/index.js +25 -20
  52. package/dist/helpers/banner.d.ts +1 -1
  53. package/dist/helpers/banner.d.ts.map +1 -1
  54. package/dist/utils/version.utils.d.ts.map +1 -1
  55. package/dist/utils/write.utils.d.ts.map +1 -1
  56. package/dist/utils/write.utils.js +1 -1
  57. package/package.json +123 -126
  58. package/dist/.DS_Store +0 -0
  59. package/dist/COPYRIGHT +0 -15
  60. package/dist/Makefile +0 -122
  61. package/dist/Report.txt +0 -176
  62. package/dist/cli.js.map +0 -1
  63. package/dist/commands/decrypt.command.js.map +0 -1
  64. package/dist/commands/encrypt.command.js.map +0 -1
  65. package/dist/commands/generate.command.js.map +0 -1
  66. package/dist/commands/help.command.js.map +0 -1
  67. package/dist/commands/index.js.map +0 -1
  68. package/dist/commands/reformat.command.js.map +0 -1
  69. package/dist/commands/revoke.command.js.map +0 -1
  70. package/dist/commands/session.command.js.map +0 -1
  71. package/dist/commands/sign.command.js.map +0 -1
  72. package/dist/commands/verify.command.js.map +0 -1
  73. package/dist/constants/en.js.map +0 -1
  74. package/dist/constants/fr.js.map +0 -1
  75. package/dist/constants/index.js.map +0 -1
  76. package/dist/helpers/banner.js.map +0 -1
  77. package/dist/key/key.d.ts +0 -17
  78. package/dist/key/key.d.ts.map +0 -1
  79. package/dist/key/key.js +0 -19
  80. package/dist/key/key.js.map +0 -1
  81. package/dist/key/rsa-reformat.cert +0 -1
  82. package/dist/key/rsa-reformat.key +0 -1
  83. package/dist/key/rsa-reformat.pub +0 -1
  84. package/dist/key/rsa-revoke.key +0 -1
  85. package/dist/key/rsa-revoke.pub +0 -1
  86. package/dist/key/rsa.cert +0 -1
  87. package/dist/key/rsa.key +0 -1
  88. package/dist/key/rsa.pub +0 -1
  89. package/dist/package.json +0 -129
  90. package/dist/utils/version.utils.js.map +0 -1
  91. package/dist/utils/write.utils.js.map +0 -1
@@ -2,92 +2,92 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.translations = void 0;
4
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.',
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
92
  };
93
93
  //# sourceMappingURL=en.js.map
@@ -19,7 +19,7 @@ export declare const translations: {
19
19
  readonly CLI_FN_8_DES: "Vérifie les signatures des messages signés en texte clair.";
20
20
  readonly CLI_FN_9_TTL: "Help";
21
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 :";
22
+ readonly CLI_HDL_1_DES: "Nous avons besoin que vous nous fournissiez les informations suivantes :";
23
23
  readonly PROMPT_SELECT_TTL: "Selection";
24
24
  readonly PROMPT_SELECT_DES: "Sélectionnez une fonction à exécuter.";
25
25
  readonly CLI_ERR_1: "🔔 Vous devez sélectionner une commande.";
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/constants/fr.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAyBf,CAAC"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/constants/fr.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAoDf,CAAC"}
@@ -2,29 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.translations = void 0;
4
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.',
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
29
  };
30
30
  //# sourceMappingURL=fr.js.map
@@ -1,5 +1,7 @@
1
+ import * as en from "./en";
2
+ export type Translations = typeof en.translations;
1
3
  declare const locale: string;
2
- declare let constants: any;
3
- declare function language(data: string): Promise<void>;
4
+ declare let constants: Translations;
5
+ declare function language(data: string): void;
4
6
  export { language, constants, locale };
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAI3B,MAAM,MAAM,YAAY,GAAG,OAAO,EAAE,CAAC,YAAY,CAAC;AAGlD,QAAA,MAAM,MAAM,QAA6D,CAAC;AAE1E,QAAA,IAAI,SAAS,EAAE,YAA8B,CAAC;AAM9C,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAOpC;AAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC"}
@@ -15,32 +15,37 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
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
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.locale = exports.constants = exports.language = void 0;
36
+ exports.locale = exports.constants = void 0;
37
+ exports.language = language;
27
38
  const en = __importStar(require("./en"));
28
39
  const fr = __importStar(require("./fr"));
29
40
  const locale = Intl.DateTimeFormat().resolvedOptions().locale.slice(0, 2);
30
41
  exports.locale = locale;
31
- let constants;
42
+ let constants = en.translations;
32
43
  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
- }
44
+ function language(data) {
45
+ if (data === "fr") {
46
+ exports.constants = constants = fr.translations;
47
+ return;
43
48
  }
49
+ exports.constants = constants = en.translations;
44
50
  }
45
- exports.language = language;
46
51
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export declare const welcome: (data: string) => Promise<any>;
1
+ export declare const welcome: (data: string) => Promise<(data: string) => Promise<any>>;
2
2
  //# sourceMappingURL=banner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/helpers/banner.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,SAAgB,MAAM,iBAQzC,CAAA"}
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/helpers/banner.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,OAAO,GAAU,MAAM,MAAM,oBAAN,MAAM,kBAQzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"version.utils.d.ts","sourceRoot":"","sources":["../../src/utils/version.utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,uBActB,CAAC"}
1
+ {"version":3,"file":"version.utils.d.ts","sourceRoot":"","sources":["../../src/utils/version.utils.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,uBAetB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"write.utils.d.ts","sourceRoot":"","sources":["../../src/utils/write.utils.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,UAAQ,EAAE,KAAK,UAAQ;CAQ3D"}
1
+ {"version":3,"file":"write.utils.d.ts","sourceRoot":"","sources":["../../src/utils/write.utils.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;IAQrB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,UAAQ,EAAE,KAAK,UAAQ;CAQ3D"}
@@ -8,7 +8,7 @@ class writeUtils {
8
8
  stream.write(s);
9
9
  }
10
10
  else {
11
- stream.write(s + "\n");
11
+ stream.write(`${s}\n`);
12
12
  }
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,129 +1,126 @@
1
1
  {
2
- "author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
3
- "autoupdate": {
4
- "fileMap": [
5
- {
6
- "basePath": "dist",
7
- "files": [
8
- "**/*"
9
- ]
10
- }
11
- ],
12
- "source": "git",
13
- "target": "git://github.com/sebastienrousseau/crypto-service.git"
14
- },
15
- "bin": {
16
- "cryptocli": "dist/cli"
17
- },
18
- "bugs": {
19
- "url": "https://github.com/sebastienrousseau/crypto-service/issues"
20
- },
21
- "dependencies": {
22
- "@types/openpgp": "^4.4.18",
23
- "figlet": "^1.5.2",
24
- "kleur": "^4.1.5",
25
- "openpgp": "^5.3.1",
26
- "prompts": "^2.4.2"
27
- },
28
- "description": "The Crypto Lib Command Line Interface (CLI) is a unified tool to perform common cryptographic operations such as key generation, data encryption, digital signing, and signature verification which are invoked from the command prompt or terminal.",
29
- "devDependencies": {
30
- "@sebastienrousseau/c8-config": "^0.0.3",
31
- "@sebastienrousseau/crypto-lib": "0.0.2",
32
- "@sebastienrousseau/eslint-config": "^0.0.2",
33
- "@sebastienrousseau/jsdoc-config": "^0.0.5",
34
- "@sebastienrousseau/markdownlint-config": "^0.0.1",
35
- "@sebastienrousseau/mocha-config": "^0.0.5",
36
- "@sebastienrousseau/prettier-config": "^0.0.4",
37
- "@sebastienrousseau/remark-config": "^0.0.3",
38
- "@types/chai": "^4.3.1",
39
- "@types/chai-as-promised": "^7.1.5",
40
- "@types/figlet": "^1.5.4",
41
- "@types/mocha": "^9.1.1",
42
- "@types/prompts": "^2.0.14",
43
- "@typescript-eslint/eslint-plugin": "^5.30.5",
44
- "@typescript-eslint/parser": "^5.30.5",
45
- "c8": "^7.11.3",
46
- "chai": "^4.3.6",
47
- "chai-as-promised": "^7.1.1",
48
- "coveralls": "^3.1.1",
49
- "eslint": "^8.19.0",
50
- "eslint-import-resolver-typescript": "^3.2.4",
51
- "eslint-plugin-import": "^2.26.0",
52
- "filesizes": "^0.1.2",
53
- "mocha": "^10.0.0",
54
- "prettier": "^2.7.1",
55
- "remark-cli": "^11.0.0",
56
- "remark-footnotes": "^4.0.1",
57
- "remark-preset-lint-consistent": "^5.1.1",
58
- "remark-preset-lint-markdown-style-guide": "^5.1.2",
59
- "remark-preset-lint-recommended": "^6.1.2",
60
- "rimraf": "^3.0.2",
61
- "ts-node": "^10.8.2",
62
- "typedoc": "^0.23.6",
63
- "typedoc-plugin-missing-exports": "^0.23.0",
64
- "typescript": "^4.7.4"
65
- },
66
- "directories": {
67
- "src": "./src",
68
- "test": "__tests__"
69
- },
70
- "engines": {
71
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
72
- },
73
- "files": [
74
- "dist/**/*"
75
- ],
76
- "funding": [
77
- {
78
- "type": "github",
79
- "url": "https://github.com/sponsors/sebastienrousseau"
80
- },
81
- {
82
- "type": "paypal",
83
- "url": "https://paypal.me/wwdseb"
84
- }
85
- ],
86
- "homepage": "https://cryptocli.io",
87
- "keywords": [
88
- "cli"
2
+ "author": "Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>",
3
+ "autoupdate": {
4
+ "fileMap": [
5
+ {
6
+ "basePath": "dist",
7
+ "files": [
8
+ "**/*"
9
+ ]
10
+ }
89
11
  ],
90
- "license": "MIT",
91
- "license_URI": "http://www.opensource.org/licenses/mit-license.php",
92
- "lockfileVersion": 1,
93
- "main": "./dist/cli.js",
94
- "name": "@sebastienrousseau/crypto-cli",
95
- "private": false,
96
- "publishConfig": {
97
- "access": "public",
98
- "registry": "https://npm.pkg.github.com"
99
- },
100
- "repository": {
101
- "directory": "packages/crypto-cli",
102
- "type": "git",
103
- "url": "git@github.com:sebastienrousseau/crypto-service.git"
104
- },
105
- "scripts": {
106
- "build": "tsc --build tsconfig.json && yarn run copy:makefile && yarn copy:package && yarn run copy:copyright && yarn copy:key && yarn run filesize:distribution",
107
- "clean": "rimraf ./coverage ./dist ./docs ./node_modules",
108
- "copy:copyright": "cp COPYRIGHT dist/",
109
- "copy:key": "cp src/key/*.pub dist/key/ && cp src/key/*.key dist/key/ && cp src/key/*.cert dist/key/",
110
- "copy:license": "cp LICENSE dist/",
111
- "copy:makefile": "cp Makefile dist/",
112
- "copy:package": "cp package.json dist/",
113
- "copy:readme": "cp README.md dist/",
114
- "docs": "typedoc",
115
- "filesize:distribution": "filesizes dist/ > dist/Report.txt",
116
- "lint:fix": "eslint --cache --fix src/**/*.ts",
117
- "lint": "eslint src/**/*.ts",
118
- "markdown": "yarn remark ./*.md packages/**/*.md --rc-path ./.remarkrc --quiet",
119
- "prepack": "yarn build",
120
- "format": "prettier --write src/**/*.ts",
121
- "release": "yarn release:prepare && yarn release:publish",
122
- "release:prepare": "yarn pack",
123
- "release:publish": "yarn publish --access public --ignore-scripts --@OWNER:registry='https://registry.npmjs.org' && npm publish",
124
- "start": "node dist/cli.js",
125
- "test": "npx c8 --config=.c8rc --reporter=lcov mocha --config=.mocharc"
12
+ "source": "git",
13
+ "target": "git://github.com/sebastienrousseau/crypto-service.git"
14
+ },
15
+ "bin": {
16
+ "crypto-cli": "dist/cli.js",
17
+ "cryptocli": "dist/cli.js"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/sebastienrousseau/crypto-service/issues"
21
+ },
22
+ "dependencies": {
23
+ "figlet": "^1.6.0",
24
+ "kleur": "^4.1.5",
25
+ "prompts": "^2.4.2",
26
+ "@sebastienrousseau/crypto-lib": "0.0.7",
27
+ "@sebastienrousseau/crypto-cbom": "0.0.7"
28
+ },
29
+ "description": "The Crypto Lib Command Line Interface (CLI) is a unified tool to perform common cryptographic operations such as key generation, data encryption, digital signing, and signature verification which are invoked from the command prompt or terminal.",
30
+ "devDependencies": {
31
+ "@sebastienrousseau/c8-config": "^0.0.3",
32
+ "@sebastienrousseau/eslint-config": "^0.0.2",
33
+ "@sebastienrousseau/jsdoc-config": "^0.0.5",
34
+ "@sebastienrousseau/markdownlint-config": "^0.0.1",
35
+ "@sebastienrousseau/mocha-config": "^0.0.5",
36
+ "@sebastienrousseau/prettier-config": "^0.0.4",
37
+ "@sebastienrousseau/remark-config": "^0.0.3",
38
+ "@types/chai": "^4.3.7",
39
+ "@types/chai-as-promised": "^8.0.2",
40
+ "@types/figlet": "^1.5.6",
41
+ "@types/mocha": "^10.0.2",
42
+ "@types/node": "^26.4.1",
43
+ "@types/prompts": "^2.4.5",
44
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
45
+ "@typescript-eslint/parser": "^6.21.0",
46
+ "c8": "^12.0.0",
47
+ "chai": "^4.5.0",
48
+ "chai-as-promised": "^7.1.2",
49
+ "eslint": "^8.57.1",
50
+ "eslint-import-resolver-typescript": "^3.10.1",
51
+ "eslint-plugin-import": "^2.28.1",
52
+ "filesizes": "^0.1.2",
53
+ "mocha": "^10.8.2",
54
+ "prettier": "^3.9.8",
55
+ "remark-cli": "^12.0.0",
56
+ "remark-footnotes": "^5.0.0",
57
+ "remark-preset-lint-consistent": "^6.0.1",
58
+ "remark-preset-lint-markdown-style-guide": "^5.1.3",
59
+ "remark-preset-lint-recommended": "^7.0.1",
60
+ "rimraf": "^6.1.3",
61
+ "ts-node": "^10.9.1",
62
+ "typedoc": "^0.28.20",
63
+ "typedoc-plugin-missing-exports": "^4.1.4",
64
+ "typescript": "~5.9.3"
65
+ },
66
+ "directories": {
67
+ "src": "./src",
68
+ "test": "__tests__"
69
+ },
70
+ "engines": {
71
+ "node": ">=22.0.0"
72
+ },
73
+ "files": [
74
+ "dist/**/*.js",
75
+ "dist/**/*.d.ts",
76
+ "dist/**/*.d.ts.map"
77
+ ],
78
+ "funding": [
79
+ {
80
+ "type": "github",
81
+ "url": "https://github.com/sponsors/sebastienrousseau"
126
82
  },
127
- "types": "./dist/index.d.ts",
128
- "version": "0.0.1"
129
- }
83
+ {
84
+ "type": "paypal",
85
+ "url": "https://paypal.me/wwdseb"
86
+ }
87
+ ],
88
+ "homepage": "https://crypto-cli.io",
89
+ "keywords": [
90
+ "crypto-cli"
91
+ ],
92
+ "license": "MIT OR Apache-2.0",
93
+ "license_URI": "http://www.opensource.org/licenses/mit-license.php",
94
+ "main": "./dist/cli.js",
95
+ "exports": {
96
+ ".": {
97
+ "types": "./dist/index.d.ts",
98
+ "require": "./dist/cli.js",
99
+ "import": "./dist/cli.js"
100
+ }
101
+ },
102
+ "name": "@sebastienrousseau/crypto-cli",
103
+ "private": false,
104
+ "publishConfig": {
105
+ "access": "public"
106
+ },
107
+ "repository": {
108
+ "directory": "packages/crypto-cli",
109
+ "type": "git",
110
+ "url": "git@github.com:sebastienrousseau/crypto-service.git"
111
+ },
112
+ "types": "./dist/index.d.ts",
113
+ "sideEffects": false,
114
+ "version": "0.0.7",
115
+ "scripts": {
116
+ "build": "tsc --build tsconfig.json",
117
+ "clean": "rimraf ./coverage ./dist ./docs",
118
+ "lint": "eslint --ext .ts src __tests__",
119
+ "lint:fix": "eslint --cache --fix --ext .ts src __tests__",
120
+ "format": "prettier --write src/**/*.ts",
121
+ "format:check": "prettier --check \"src/**/*.ts\"",
122
+ "start": "node dist/cli.js",
123
+ "test": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --reporter=lcov --reporter=text mocha --config=.mocharc.cjs",
124
+ "docs": "typedoc"
125
+ }
126
+ }
package/dist/.DS_Store DELETED
Binary file