@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © Sebastien Rousseau 2022. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# ❯ Crypto CLI
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@sebastienrousseau/crypto-cli)
|
|
6
|
+
[](https://coveralls.io/github/sebastienrousseau/crypto-service?branch=main)
|
|
7
|
+
[](https://lerna.js.org/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
**[Website](https://cryptocli.io) • [Documentation](https://cryptocli.io/docs/)
|
|
12
|
+
• [Submit an Issue](https://github.com/sebastienrousseau/crypto-service/issues)
|
|
13
|
+
• [Contributing Guidelines](https://github.com/sebastienrousseau/crypto-service/blob/master/.github/CONTRIBUTING.md)**
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
## 👋 Welcome to Crypto CLI
|
|
18
|
+
|
|
19
|
+
Crypto CLI is a simple, yet powerful, command line interface that can be used to
|
|
20
|
+
perform common cryptographic operations from the command prompt or terminal.
|
|
21
|
+
|
|
22
|
+
![Crypto CLI][crypto-cli]
|
|
23
|
+
|
|
24
|
+
[![Getting Started][getting started]](#getting-started)
|
|
25
|
+
[![Download Crypto CLI][download]][13]
|
|
26
|
+
|
|
27
|
+
![divider][divider]
|
|
28
|
+
|
|
29
|
+
## ✨ Key Features
|
|
30
|
+
|
|
31
|
+
The cryptographic operations include:
|
|
32
|
+
|
|
33
|
+
- Authentication via Digital Signature,
|
|
34
|
+
- Confidentiality via Encryption and Decryption,
|
|
35
|
+
- Compression,
|
|
36
|
+
- Key Generation,
|
|
37
|
+
- Key Management,
|
|
38
|
+
- Pseudorandom Number Generation,
|
|
39
|
+
- Signature Verification.
|
|
40
|
+
|
|
41
|
+
This library is based on [OpenPGP.js][1] - a JavaScript implementation of the
|
|
42
|
+
OpenPGP protocol. It implements [RFC4880][2] and parts of [RFC4880bis][3].
|
|
43
|
+
|
|
44
|
+
Development of this library is hosted by [GitHub][4] at the [following page][5].
|
|
45
|
+
Source code is available to everyone under the standard [MIT license][6].
|
|
46
|
+
|
|
47
|
+
![divider][divider]
|
|
48
|
+
|
|
49
|
+
## Getting Started
|
|
50
|
+
|
|
51
|
+
👉 Note: » Crypto CLI is a [Node.js][7] module available through the
|
|
52
|
+
[npm registry][8]. Before installing, [download and install Node.js][7].
|
|
53
|
+
Node.js 12.20.0 or or later.
|
|
54
|
+
|
|
55
|
+
This allows you to always be on the latest version when we release new builds
|
|
56
|
+
with automatic upgrades.
|
|
57
|
+
|
|
58
|
+
![divider][divider]
|
|
59
|
+
|
|
60
|
+
## 🔧 Installation
|
|
61
|
+
|
|
62
|
+
The first step to using Crypto CLI is to download and install the
|
|
63
|
+
application and other required components.
|
|
64
|
+
|
|
65
|
+
1️⃣ Install the Crypto CLI via [`npm`][8], [`yarn`][9] or [`pnpm`][10] package
|
|
66
|
+
managers:
|
|
67
|
+
|
|
68
|
+
- `npm i @sebastienrousseau/crypto-cli`
|
|
69
|
+
- `yarn add @sebastienrousseau/crypto-cli`
|
|
70
|
+
- `pnpm add @sebastienrousseau/crypto-cli`
|
|
71
|
+
|
|
72
|
+
For users who are unable to install the Crypto CLI, released builds can be
|
|
73
|
+
manually downloaded from this repository's
|
|
74
|
+
[Releases page](https://github.com/sebastienrousseau/crypto-service/releases/).
|
|
75
|
+
|
|
76
|
+
### What's included
|
|
77
|
+
|
|
78
|
+
Within the download you'll find all the crypto lib source files grouped into
|
|
79
|
+
the *dist* folder.
|
|
80
|
+
|
|
81
|
+
You'll see something like this:
|
|
82
|
+
|
|
83
|
+
```shell
|
|
84
|
+
.
|
|
85
|
+
├── COPYRIGHT
|
|
86
|
+
├── Makefile
|
|
87
|
+
├── Report.txt
|
|
88
|
+
├── cli.d.ts
|
|
89
|
+
├── cli.d.ts.map
|
|
90
|
+
├── cli.js
|
|
91
|
+
├── cli.js.map
|
|
92
|
+
├── commands
|
|
93
|
+
│ ├── decrypt.command.d.ts
|
|
94
|
+
│ ├── decrypt.command.d.ts.map
|
|
95
|
+
│ ├── decrypt.command.js
|
|
96
|
+
│ ├── decrypt.command.js.map
|
|
97
|
+
│ ├── encrypt.command.d.ts
|
|
98
|
+
│ ├── encrypt.command.d.ts.map
|
|
99
|
+
│ ├── encrypt.command.js
|
|
100
|
+
│ ├── encrypt.command.js.map
|
|
101
|
+
│ ├── generate.command.d.ts
|
|
102
|
+
│ ├── generate.command.d.ts.map
|
|
103
|
+
│ ├── generate.command.js
|
|
104
|
+
│ ├── generate.command.js.map
|
|
105
|
+
│ ├── help.command.d.ts
|
|
106
|
+
│ ├── help.command.d.ts.map
|
|
107
|
+
│ ├── help.command.js
|
|
108
|
+
│ ├── help.command.js.map
|
|
109
|
+
│ ├── index.d.ts
|
|
110
|
+
│ ├── index.d.ts.map
|
|
111
|
+
│ ├── index.js
|
|
112
|
+
│ ├── index.js.map
|
|
113
|
+
│ ├── reformat.command.d.ts
|
|
114
|
+
│ ├── reformat.command.d.ts.map
|
|
115
|
+
│ ├── reformat.command.js
|
|
116
|
+
│ ├── reformat.command.js.map
|
|
117
|
+
│ ├── revoke.command.d.ts
|
|
118
|
+
│ ├── revoke.command.d.ts.map
|
|
119
|
+
│ ├── revoke.command.js
|
|
120
|
+
│ ├── revoke.command.js.map
|
|
121
|
+
│ ├── session.command.d.ts
|
|
122
|
+
│ ├── session.command.d.ts.map
|
|
123
|
+
│ ├── session.command.js
|
|
124
|
+
│ ├── session.command.js.map
|
|
125
|
+
│ ├── sign.command.d.ts
|
|
126
|
+
│ ├── sign.command.d.ts.map
|
|
127
|
+
│ ├── sign.command.js
|
|
128
|
+
│ ├── sign.command.js.map
|
|
129
|
+
│ ├── verify.command.d.ts
|
|
130
|
+
│ ├── verify.command.d.ts.map
|
|
131
|
+
│ ├── verify.command.js
|
|
132
|
+
│ └── verify.command.js.map
|
|
133
|
+
├── helpers
|
|
134
|
+
│ ├── banner.d.ts
|
|
135
|
+
│ ├── banner.d.ts.map
|
|
136
|
+
│ ├── banner.js
|
|
137
|
+
│ └── banner.js.map
|
|
138
|
+
├── key
|
|
139
|
+
│ ├── key.d.ts
|
|
140
|
+
│ ├── key.d.ts.map
|
|
141
|
+
│ ├── key.js
|
|
142
|
+
│ ├── key.js.map
|
|
143
|
+
│ ├── rsa-reformat.cert
|
|
144
|
+
│ ├── rsa-reformat.key
|
|
145
|
+
│ ├── rsa-reformat.pub
|
|
146
|
+
│ ├── rsa-revoke.key
|
|
147
|
+
│ ├── rsa-revoke.pub
|
|
148
|
+
│ ├── rsa.cert
|
|
149
|
+
│ ├── rsa.key
|
|
150
|
+
│ └── rsa.pub
|
|
151
|
+
├── package.json
|
|
152
|
+
└── utils
|
|
153
|
+
├── version.utils.d.ts
|
|
154
|
+
├── version.utils.d.ts.map
|
|
155
|
+
├── version.utils.js
|
|
156
|
+
├── version.utils.js.map
|
|
157
|
+
├── write.utils.d.ts
|
|
158
|
+
├── write.utils.d.ts.map
|
|
159
|
+
├── write.utils.js
|
|
160
|
+
└── write.utils.js.map
|
|
161
|
+
|
|
162
|
+
4 directories, 72 files
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
2️⃣ Set up your app
|
|
167
|
+
|
|
168
|
+
You can get started with a simple app by running the following in your terminal:
|
|
169
|
+
|
|
170
|
+
```shell
|
|
171
|
+
|
|
172
|
+
> mkdir my-app
|
|
173
|
+
> cd my-app
|
|
174
|
+
> yarn add @sebastienrousseau/crypto-cli -D
|
|
175
|
+
> yarn start
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
3️⃣ Try it out and let us know what you think!
|
|
180
|
+
|
|
181
|
+
![divider][divider]
|
|
182
|
+
|
|
183
|
+
## ❯ Crypto Command Line Interface (CLI) syntax
|
|
184
|
+
|
|
185
|
+
The Crypto CLI accepts multiple types of options. Options are a list of flags
|
|
186
|
+
and other parameters that can control the behavior of the Crypto CLI as a
|
|
187
|
+
whole.
|
|
188
|
+
|
|
189
|
+
Below is the full list of supported options for the Crypto CLI.
|
|
190
|
+
|
|
191
|
+
| Option | Description |
|
|
192
|
+
|---|---|
|
|
193
|
+
| help | Displays the help message. |
|
|
194
|
+
| decrypt | Decrypts a message. |
|
|
195
|
+
| encrypt | Encrypts a message. |
|
|
196
|
+
| generate | Generates a new OpenPGP key pair. Supports RSA and ECC keys. |
|
|
197
|
+
| reformat | Reformats signature packets for a key. |
|
|
198
|
+
| revoke | Revokes a key. |
|
|
199
|
+
| session | Generate a new session key object. |
|
|
200
|
+
| sign | Signs a message. |
|
|
201
|
+
| verify | Verifies signatures of clear text signed message. |
|
|
202
|
+
|
|
203
|
+
![divider][divider]
|
|
204
|
+
|
|
205
|
+
## 🚥 Semantic Versioning Policy
|
|
206
|
+
|
|
207
|
+
For transparency into our release cycle and in striving to maintain backward
|
|
208
|
+
compatibility, `crypto-cli` follows [semantic versioning](http://semver.org/)
|
|
209
|
+
and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
|
|
210
|
+
|
|
211
|
+
![divider][divider]
|
|
212
|
+
|
|
213
|
+
## ✅ Changelog
|
|
214
|
+
|
|
215
|
+
- [GitHub Releases](https://github.com/sebastienrousseau/crypto-service/releases)
|
|
216
|
+
|
|
217
|
+
![divider][divider]
|
|
218
|
+
|
|
219
|
+
## ❤️ Contributing
|
|
220
|
+
|
|
221
|
+
Thank you for using Crypto CLI! If you like the library, it would be great if
|
|
222
|
+
you can give it a star ⭐ on [GitHub][5].
|
|
223
|
+
|
|
224
|
+
There are also many ways in which you can participate in this project, for
|
|
225
|
+
example:
|
|
226
|
+
|
|
227
|
+
- [Submit bugs and feature requests][14], and help us verify as they are checked
|
|
228
|
+
in,
|
|
229
|
+
- Review [source code changes][15], and help us improve our code quality,
|
|
230
|
+
- Review the [documentation][16] and make pull requests for anything from typos
|
|
231
|
+
to additional and new content.
|
|
232
|
+
|
|
233
|
+
![divider][divider]
|
|
234
|
+
|
|
235
|
+
## 🥂 License
|
|
236
|
+
|
|
237
|
+
Copyright (c) Sebastien Rousseau. All rights reserved.
|
|
238
|
+
|
|
239
|
+
Licensed under the [MIT](LICENSE) license.
|
|
240
|
+
|
|
241
|
+
![divider][divider]
|
|
242
|
+
|
|
243
|
+
## 🏢 Acknowledgements
|
|
244
|
+
|
|
245
|
+
[Crypto Service Suite](https://crypto-service.co) is beautifully crafted by
|
|
246
|
+
these people and a bunch of awesome [contributors][17].
|
|
247
|
+
|
|
248
|
+
| Contributors |
|
|
249
|
+
|---------|
|
|
250
|
+
|[](https://sebastienrousseau.co.uk)|
|
|
251
|
+
|[Sebastien Rousseau](https://github.com/sebastienrousseau)|
|
|
252
|
+
|
|
253
|
+
[1]: https://openpgpjs.org/
|
|
254
|
+
[2]: https://tools.ietf.org/html/rfc4880
|
|
255
|
+
[3]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-10
|
|
256
|
+
[4]: https://github.com
|
|
257
|
+
[5]: https://github.com/sebastienrousseau/crypto-service
|
|
258
|
+
[6]: https://github.com/sebastienrousseau/crypto-service/blob/main/LICENSE
|
|
259
|
+
[7]: https://nodejs.org/en/
|
|
260
|
+
[8]: https://www.npmjs.com/
|
|
261
|
+
[9]: https://yarnpkg.com/getting-started
|
|
262
|
+
[10]: https://pnpm.io/motivation
|
|
263
|
+
[11]: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
|
|
264
|
+
[12]: https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
|
|
265
|
+
[13]: https://github.com/sebastienrousseau/crypto-service/packages/
|
|
266
|
+
[14]: https://github.com/sebastienrousseau/crypto-service/issues/new
|
|
267
|
+
[15]: https://github.com/sebastienrousseau/crypto-service/pulls
|
|
268
|
+
[16]: https://github.com/sebastienrousseau/crypto-service/docs
|
|
269
|
+
[17]: https://github.com/sebastienrousseau/crypto-service/graphs/contributors
|
|
270
|
+
|
|
271
|
+
[divider]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/divider.svg
|
|
272
|
+
[crypto-cli]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/main/assets/crypto-cli.svg "Crypto CLI"
|
|
273
|
+
[getting started]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/button-primary.svg
|
|
274
|
+
[download]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/button-secondary.svg
|
package/dist/.DS_Store
ADDED
|
Binary file
|
package/dist/COPYRIGHT
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ____ _ _ _ _
|
|
3
|
+
* / ___|_ __ _ _ _ __ | |_ ___ | | (_) |__
|
|
4
|
+
* | | | '__| | | | '_ \| __/ _ \ | | | | '_ \
|
|
5
|
+
* | |___| | | |_| | |_) | || (_) | | |___| | |_) |
|
|
6
|
+
* \____|_| \__, | .__/ \__\___/ |_____|_|_.__/
|
|
7
|
+
* |___/|_|
|
|
8
|
+
*
|
|
9
|
+
* Crypto Lib
|
|
10
|
+
* https://cryptolib.io
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
13
|
+
* Licensed under the MIT license
|
|
14
|
+
*
|
|
15
|
+
*/
|
package/dist/Makefile
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# ____ _ ____ _ ___
|
|
2
|
+
# / ___|_ __ _ _ _ __ | |_ ___ / ___| | |_ _|
|
|
3
|
+
# | | | '__| | | | '_ \| __/ _ \ | | | | | |
|
|
4
|
+
# | |___| | | |_| | |_) | || (_) | | |___| |___ | |
|
|
5
|
+
# \____|_| \__, | .__/ \__\___/ \____|_____|___|
|
|
6
|
+
# |___/|_|
|
|
7
|
+
#
|
|
8
|
+
# Crypto CLI
|
|
9
|
+
# https://cryptocli.io
|
|
10
|
+
#
|
|
11
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
12
|
+
# Licensed under the MIT license
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
export OS ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
|
16
|
+
export CRYPTO_CLI_PATH ?= $(shell 'pwd')
|
|
17
|
+
|
|
18
|
+
# Forces auto-init off to avoid invoking the macro on recursive $(MAKE)
|
|
19
|
+
export CRYPTO_CLI_AUTO_INIT := false
|
|
20
|
+
|
|
21
|
+
.DEFAULT_GOAL := help
|
|
22
|
+
|
|
23
|
+
PROJECT = Crypto CLI
|
|
24
|
+
|
|
25
|
+
# Run commands with the yarn debugger. (default: false)
|
|
26
|
+
DEBUG ?=false
|
|
27
|
+
|
|
28
|
+
ifeq ($(DEBUG),false)
|
|
29
|
+
yarn = yarn
|
|
30
|
+
else
|
|
31
|
+
yarn = yarn debug
|
|
32
|
+
endif
|
|
33
|
+
|
|
34
|
+
ifeq ($(words $(MAKEFILE_LIST)),1)
|
|
35
|
+
NAME = $(PROJECT)
|
|
36
|
+
GITHUB = https://github.com/sebastienrousseau/crypto-service/tree/main/packages/crypto-cli
|
|
37
|
+
DESCRIPTION = A simple, yet powerful, command line interface that can be used to perform common cryptographic operations from the command prompt or terminal.
|
|
38
|
+
AUTHOR = Sebastien Rousseau (https://github.com/sebastienrousseau)
|
|
39
|
+
endif
|
|
40
|
+
|
|
41
|
+
# @HELP Run all commands.
|
|
42
|
+
all:
|
|
43
|
+
@echo
|
|
44
|
+
@echo ${PROJECT} executing all commands...
|
|
45
|
+
make ncu && make install && make build && make lint && make test
|
|
46
|
+
|
|
47
|
+
# @HELP Display information about the project.
|
|
48
|
+
info:
|
|
49
|
+
@echo
|
|
50
|
+
@echo NAME: '$(NAME)'
|
|
51
|
+
@echo
|
|
52
|
+
@echo DESCRIPTION:'$(DESCRIPTION)'
|
|
53
|
+
@echo
|
|
54
|
+
@echo AUTHOR: '$(AUTHOR)'
|
|
55
|
+
@echo
|
|
56
|
+
@echo GITHUB: '$(GITHUB)'
|
|
57
|
+
@echo
|
|
58
|
+
|
|
59
|
+
# @HELP Run Install.
|
|
60
|
+
install:
|
|
61
|
+
@echo
|
|
62
|
+
@echo ${PROJECT} installing...
|
|
63
|
+
$(yarn) install
|
|
64
|
+
|
|
65
|
+
# @HELP Run npx check updates.
|
|
66
|
+
ncu:
|
|
67
|
+
@echo
|
|
68
|
+
@echo ${PROJECT} checking npx updates...
|
|
69
|
+
npx npm-check-updates -u
|
|
70
|
+
|
|
71
|
+
# @HELP Run build.
|
|
72
|
+
build:
|
|
73
|
+
@echo
|
|
74
|
+
@echo ${PROJECT} building...
|
|
75
|
+
$(yarn) build
|
|
76
|
+
|
|
77
|
+
# @HELP Run directory clean.
|
|
78
|
+
clean:
|
|
79
|
+
@echo
|
|
80
|
+
@echo ${PROJECT} cleaning...
|
|
81
|
+
$(yarn) clean
|
|
82
|
+
|
|
83
|
+
# @HELP Run Unit test.
|
|
84
|
+
test:
|
|
85
|
+
@echo
|
|
86
|
+
@echo ${PROJECT} checking unit tests...
|
|
87
|
+
$(yarn) test
|
|
88
|
+
|
|
89
|
+
# @HELP Run Documentation.
|
|
90
|
+
docs:
|
|
91
|
+
@echo
|
|
92
|
+
@echo ${PROJECT} generating documentation...
|
|
93
|
+
$(yarn) docs
|
|
94
|
+
|
|
95
|
+
# @HELP Run Eslint and autofix.
|
|
96
|
+
lint:
|
|
97
|
+
@echo
|
|
98
|
+
@echo ${PROJECT} running eslint...
|
|
99
|
+
$(yarn) lint:fix
|
|
100
|
+
|
|
101
|
+
# @HELP Display the help menu.
|
|
102
|
+
help:
|
|
103
|
+
@ echo ''
|
|
104
|
+
@ echo '⚙️ Crypto Lib (https://cryptolib.io)'
|
|
105
|
+
@ echo ''
|
|
106
|
+
@ echo ' Usage:'
|
|
107
|
+
@ echo ''
|
|
108
|
+
@ echo ' make <target> [flags...]'
|
|
109
|
+
@ echo ''
|
|
110
|
+
@ echo ' Targets:'
|
|
111
|
+
@ echo ''
|
|
112
|
+
@ awk '/^#/{ comment = substr($$0,3) } comment && /^[a-zA-Z][a-zA-Z0-9_-]+ ?:/{ print " ", $$1, comment }' $(MAKEFILE_LIST) | column -t -s ':' | sort
|
|
113
|
+
@ echo ''
|
|
114
|
+
@ echo ' Flags:'
|
|
115
|
+
@ echo ''
|
|
116
|
+
@ awk '/^#/{ comment = substr($$0,3) } comment && /^[a-zA-Z][a-zA-Z0-9_-]+ ?\?=/{ print " ", $$1, $$2, comment }' $(MAKEFILE_LIST) | column -t -s '?=' | sort
|
|
117
|
+
@ echo ''
|
|
118
|
+
@ echo 'Copyright (c) Sebastien Rousseau 2022. All rights reserved'
|
|
119
|
+
@ echo 'Licensed under the MIT license'
|
|
120
|
+
@ echo ''
|
|
121
|
+
|
|
122
|
+
.PHONY: all clean install build test run lint lint-fix docs help
|
package/dist/Report.txt
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
┌────────────────────────────────────┬───────────┬────────────────┐
|
|
2
|
+
│ File │ Size │ Size (gzipped) │
|
|
3
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
4
|
+
│ COPYRIGHT │ 416 B │ 239 B │
|
|
5
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
6
|
+
│ Makefile │ 3.01 kB │ 1.25 kB │
|
|
7
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
8
|
+
│ Report.txt │ 0 B │ 20 B │
|
|
9
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
10
|
+
│ cli.d.ts │ 64 B │ 84 B │
|
|
11
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
12
|
+
│ cli.d.ts.map │ 100 B │ 102 B │
|
|
13
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
14
|
+
│ cli.js │ 5.61 kB │ 839 B │
|
|
15
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
16
|
+
│ cli.js.map │ 3.71 kB │ 499 B │
|
|
17
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
18
|
+
│ package.json │ 4.85 kB │ 1.63 kB │
|
|
19
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
20
|
+
│ commands/decrypt.command.d.ts │ 125 B │ 126 B │
|
|
21
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
22
|
+
│ commands/decrypt.command.d.ts.map │ 188 B │ 153 B │
|
|
23
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
24
|
+
│ commands/decrypt.command.js │ 1.44 kB │ 582 B │
|
|
25
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
26
|
+
│ commands/decrypt.command.js.map │ 889 B │ 416 B │
|
|
27
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
28
|
+
│ commands/encrypt.command.d.ts │ 125 B │ 126 B │
|
|
29
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
30
|
+
│ commands/encrypt.command.d.ts.map │ 188 B │ 156 B │
|
|
31
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
32
|
+
│ commands/encrypt.command.js │ 1.42 kB │ 576 B │
|
|
33
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
34
|
+
│ commands/encrypt.command.js.map │ 887 B │ 410 B │
|
|
35
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
36
|
+
│ commands/generate.command.d.ts │ 128 B │ 126 B │
|
|
37
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
38
|
+
│ commands/generate.command.d.ts.map │ 190 B │ 153 B │
|
|
39
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
40
|
+
│ commands/generate.command.js │ 2.17 kB │ 692 B │
|
|
41
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
42
|
+
│ commands/generate.command.js.map │ 1.4 kB │ 474 B │
|
|
43
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
44
|
+
│ commands/help.command.d.ts │ 116 B │ 122 B │
|
|
45
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
46
|
+
│ commands/help.command.d.ts.map │ 181 B │ 152 B │
|
|
47
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
48
|
+
│ commands/help.command.js │ 10.4 kB │ 908 B │
|
|
49
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
50
|
+
│ commands/help.command.js.map │ 7.07 kB │ 480 B │
|
|
51
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
52
|
+
│ commands/index.d.ts │ 424 B │ 174 B │
|
|
53
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
54
|
+
│ commands/index.d.ts.map │ 155 B │ 139 B │
|
|
55
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
56
|
+
│ commands/index.js │ 1.34 kB │ 417 B │
|
|
57
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
58
|
+
│ commands/index.js.map │ 456 B │ 243 B │
|
|
59
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
60
|
+
│ commands/reformat.command.d.ts │ 128 B │ 125 B │
|
|
61
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
62
|
+
│ commands/reformat.command.d.ts.map │ 190 B │ 156 B │
|
|
63
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
64
|
+
│ commands/reformat.command.js │ 1.87 kB │ 649 B │
|
|
65
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
66
|
+
│ commands/reformat.command.js.map │ 1.22 kB │ 461 B │
|
|
67
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
68
|
+
│ commands/revoke.command.d.ts │ 122 B │ 125 B │
|
|
69
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
70
|
+
│ commands/revoke.command.d.ts.map │ 186 B │ 156 B │
|
|
71
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
72
|
+
│ commands/revoke.command.js │ 1.33 kB │ 569 B │
|
|
73
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
74
|
+
│ commands/revoke.command.js.map │ 853 B │ 398 B │
|
|
75
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
76
|
+
│ commands/session.command.d.ts │ 125 B │ 125 B │
|
|
77
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
78
|
+
│ commands/session.command.d.ts.map │ 188 B │ 151 B │
|
|
79
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
80
|
+
│ commands/session.command.js │ 1.41 kB │ 583 B │
|
|
81
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
82
|
+
│ commands/session.command.js.map │ 926 B │ 399 B │
|
|
83
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
84
|
+
│ commands/sign.command.d.ts │ 116 B │ 121 B │
|
|
85
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
86
|
+
│ commands/sign.command.d.ts.map │ 181 B │ 154 B │
|
|
87
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
88
|
+
│ commands/sign.command.js │ 1.61 kB │ 619 B │
|
|
89
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
90
|
+
│ commands/sign.command.js.map │ 1.05 kB │ 441 B │
|
|
91
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
92
|
+
│ commands/verify.command.d.ts │ 122 B │ 126 B │
|
|
93
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
94
|
+
│ commands/verify.command.d.ts.map │ 186 B │ 153 B │
|
|
95
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
96
|
+
│ commands/verify.command.js │ 1.43 kB │ 587 B │
|
|
97
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
98
|
+
│ commands/verify.command.js.map │ 925 B │ 409 B │
|
|
99
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
100
|
+
│ constants/en.d.ts │ 7.7 kB │ 1.9 kB │
|
|
101
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
102
|
+
│ constants/en.d.ts.map │ 228 B │ 140 B │
|
|
103
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
104
|
+
│ constants/en.js │ 7.02 kB │ 1.93 kB │
|
|
105
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
106
|
+
│ constants/en.js.map │ 2.22 kB │ 697 B │
|
|
107
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
108
|
+
│ constants/fr.d.ts │ 1.61 kB │ 678 B │
|
|
109
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
110
|
+
│ constants/fr.d.ts.map │ 165 B │ 138 B │
|
|
111
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
112
|
+
│ constants/fr.js │ 1.49 kB │ 719 B │
|
|
113
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
114
|
+
│ constants/fr.js.map │ 676 B │ 325 B │
|
|
115
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
116
|
+
│ constants/index.d.ts │ 189 B │ 153 B │
|
|
117
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
118
|
+
│ constants/index.d.ts.map │ 271 B │ 190 B │
|
|
119
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
120
|
+
│ constants/index.js │ 1.78 kB │ 709 B │
|
|
121
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
122
|
+
│ constants/index.js.map │ 637 B │ 300 B │
|
|
123
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
124
|
+
│ helpers/banner.d.ts │ 98 B │ 114 B │
|
|
125
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
126
|
+
│ helpers/banner.d.ts.map │ 159 B │ 144 B │
|
|
127
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
128
|
+
│ helpers/banner.js │ 720 B │ 380 B │
|
|
129
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
130
|
+
│ helpers/banner.js.map │ 529 B │ 269 B │
|
|
131
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
132
|
+
│ key/key.d.ts │ 584 B │ 214 B │
|
|
133
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
134
|
+
│ key/key.d.ts.map │ 321 B │ 195 B │
|
|
135
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
136
|
+
│ key/key.js │ 1.17 kB │ 364 B │
|
|
137
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
138
|
+
│ key/key.js.map │ 777 B │ 337 B │
|
|
139
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
140
|
+
│ key/rsa-reformat.cert │ 732 B │ 576 B │
|
|
141
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
142
|
+
│ key/rsa-reformat.key │ 4.83 kB │ 3.51 kB │
|
|
143
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
144
|
+
│ key/rsa-reformat.pub │ 2.3 kB │ 1.68 kB │
|
|
145
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
146
|
+
│ key/rsa-revoke.key │ 5.23 kB │ 3.8 kB │
|
|
147
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
148
|
+
│ key/rsa-revoke.pub │ 2.88 kB │ 2.09 kB │
|
|
149
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
150
|
+
│ key/rsa.cert │ 732 B │ 573 B │
|
|
151
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
152
|
+
│ key/rsa.key │ 4.83 kB │ 3.52 kB │
|
|
153
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
154
|
+
│ key/rsa.pub │ 2.3 kB │ 1.68 kB │
|
|
155
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
156
|
+
│ utils/version.utils.d.ts │ 99 B │ 111 B │
|
|
157
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
158
|
+
│ utils/version.utils.d.ts.map │ 160 B │ 138 B │
|
|
159
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
160
|
+
│ utils/version.utils.js │ 680 B │ 379 B │
|
|
161
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
162
|
+
│ utils/version.utils.js.map │ 613 B │ 314 B │
|
|
163
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
164
|
+
│ utils/write.utils.d.ts │ 152 B │ 144 B │
|
|
165
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
166
|
+
│ utils/write.utils.d.ts.map │ 217 B │ 169 B │
|
|
167
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
168
|
+
│ utils/write.utils.js │ 503 B │ 294 B │
|
|
169
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
170
|
+
│ utils/write.utils.js.map │ 522 B │ 261 B │
|
|
171
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
172
|
+
├────────────────────────────────────┼───────────┼────────────────┤
|
|
173
|
+
│ Total files: 84 │ 116 kB │ 46.9 kB │
|
|
174
|
+
└────────────────────────────────────┴───────────┴────────────────┘
|
|
175
|
+
|
|
176
|
+
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|