@sebastienrousseau/crypto-lib 0.0.2 → 0.0.3

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 (78) hide show
  1. package/README.md +201 -42
  2. package/dist/Report.txt +158 -70
  3. package/dist/bin/cryptolib.d.ts +23 -0
  4. package/dist/bin/cryptolib.d.ts.map +1 -0
  5. package/dist/bin/cryptolib.js +78 -0
  6. package/dist/bin/cryptolib.js.map +1 -0
  7. package/dist/config/config.d.ts +8 -0
  8. package/dist/config/config.d.ts.map +1 -0
  9. package/dist/config/config.js +13 -0
  10. package/dist/config/config.js.map +1 -0
  11. package/dist/data/decrypted.txt +1 -0
  12. package/dist/data/detached.sig +1 -0
  13. package/dist/data/encrypted.txt +1 -0
  14. package/dist/data/signed.sig +1 -0
  15. package/dist/enums.d.ts +81 -0
  16. package/dist/enums.d.ts.map +1 -0
  17. package/dist/enums.js +82 -0
  18. package/dist/enums.js.map +1 -0
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +2 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/key/key.d.ts +17 -0
  24. package/dist/key/key.d.ts.map +1 -0
  25. package/dist/key/key.js +19 -0
  26. package/dist/key/key.js.map +1 -0
  27. package/dist/key/rsa-reformat.cert +1 -0
  28. package/dist/key/rsa-reformat.key +1 -0
  29. package/dist/key/rsa-reformat.pub +1 -0
  30. package/dist/key/rsa-revoke.key +1 -0
  31. package/dist/key/rsa-revoke.pub +1 -0
  32. package/dist/key/rsa.cert +1 -0
  33. package/dist/key/rsa.key +1 -0
  34. package/dist/key/rsa.pub +1 -0
  35. package/dist/lib/decrypt.d.ts +2 -5
  36. package/dist/lib/decrypt.d.ts.map +1 -1
  37. package/dist/lib/decrypt.js +38 -20
  38. package/dist/lib/decrypt.js.map +1 -1
  39. package/dist/lib/encrypt.d.ts +2 -5
  40. package/dist/lib/encrypt.d.ts.map +1 -1
  41. package/dist/lib/encrypt.js +25 -14
  42. package/dist/lib/encrypt.js.map +1 -1
  43. package/dist/lib/generate.d.ts +2 -11
  44. package/dist/lib/generate.d.ts.map +1 -1
  45. package/dist/lib/generate.js +50 -15
  46. package/dist/lib/generate.js.map +1 -1
  47. package/dist/lib/index.d.ts +10 -0
  48. package/dist/lib/index.d.ts.map +1 -0
  49. package/dist/{bin/crypto-lib.js → lib/index.js} +18 -27
  50. package/dist/lib/index.js.map +1 -0
  51. package/dist/lib/reformat.d.ts +4 -0
  52. package/dist/lib/reformat.d.ts.map +1 -0
  53. package/dist/lib/reformat.js +91 -0
  54. package/dist/lib/reformat.js.map +1 -0
  55. package/dist/lib/revoke.d.ts +3 -3
  56. package/dist/lib/revoke.d.ts.map +1 -1
  57. package/dist/lib/revoke.js +35 -10
  58. package/dist/lib/revoke.js.map +1 -1
  59. package/dist/lib/session.d.ts +5 -0
  60. package/dist/lib/session.d.ts.map +1 -0
  61. package/dist/lib/session.js +70 -0
  62. package/dist/lib/session.js.map +1 -0
  63. package/dist/lib/sign.d.ts +4 -0
  64. package/dist/lib/sign.d.ts.map +1 -0
  65. package/dist/lib/sign.js +70 -0
  66. package/dist/lib/sign.js.map +1 -0
  67. package/dist/lib/verify.d.ts +7 -0
  68. package/dist/lib/verify.d.ts.map +1 -0
  69. package/dist/lib/verify.js +57 -0
  70. package/dist/lib/verify.js.map +1 -0
  71. package/dist/package.json +37 -25
  72. package/dist/types/types.d.ts +49 -0
  73. package/dist/types/types.d.ts.map +1 -1
  74. package/dist/types/types.js +1 -0
  75. package/package.json +37 -25
  76. package/dist/bin/crypto-lib.d.ts +0 -13
  77. package/dist/bin/crypto-lib.d.ts.map +0 -1
  78. package/dist/bin/crypto-lib.js.map +0 -1
package/README.md CHANGED
@@ -1,23 +1,34 @@
1
- # Crypto Lib
1
+ # ⚙️ Crypto Lib
2
2
 
3
3
  ![Banner representing Crypto Lib](https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/crypto-lib-logo.svg)
4
4
 
5
+ [![NPM Version](https://img.shields.io/npm/v/solid-js.svg?style=for-the-badge)](https://www.npmjs.com/package/@sebastienrousseau/crypto-lib)
6
+ [![Coverage Status](https://img.shields.io/coveralls/github/sebastienrousseau/crypto-service/solid.svg?branch=main&style=for-the-badge\&color=blueviolet)](https://coveralls.io/github/sebastienrousseau/crypto-service?branch=main)
5
7
  [![Maintained with Lerna](https://img.shields.io/badge/maintained%20with-lerna-blue?style=for-the-badge)](https://lerna.js.org/)
6
8
  [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge&logo=)](https://opensource.org/licenses/MIT)
7
9
  ![Made with Love](https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/made-with-love.svg)
8
10
 
11
+ **[Website](https://cryptolib.io) • [Documentation](https://cryptolib.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
+
9
15
  ***
10
16
 
11
- ## Welcome to Crypto Lib
17
+ ## 👋 Welcome to Crypto Lib
12
18
 
13
19
  Crypto Lib is a powerful intuitive cryptographic JavaScript library that
14
20
  encapsulates common algorithms, functions and provides an interface for
15
21
  low-level cryptographic operations.
16
22
 
23
+ ![divider][divider]
24
+
25
+ ## ✨ Key Features
26
+
17
27
  The cryptographic operations include:
18
28
 
19
- - Digital Signing,
20
- - Encryption and Decryption,
29
+ - Authentication via Digital Signature,
30
+ - Confidentiality via Encryption and Decryption,
31
+ - Compression,
21
32
  - Key Generation,
22
33
  - Key Management,
23
34
  - Pseudorandom Number Generation,
@@ -29,20 +40,33 @@ OpenPGP protocol. It implements [RFC4880][2] and parts of [RFC4880bis][3].
29
40
  Development of this library is hosted by [GitHub][4] at the [following page][5].
30
41
  Source code is available to everyone under the standard [MIT license][6].
31
42
 
32
- ## Getting Started
43
+ ![divider][divider]
33
44
 
34
- Crypto Lib is a [Node.js][7] module available through the
45
+ ## ⏩ Getting Started
46
+
47
+ 👉 Note: » Crypto Lib is a [Node.js][7] module available through the
35
48
  [npm registry][8]. Before installing, [download and install Node.js][7].
36
49
  Node.js 12.20.0 or higher is required.
37
50
 
38
- Installation is done using either [`npm`][8], [`yarn`][9] or [`pnpm`][10]
39
- package managers to use Crypto Lib with Node.js or the Command Line Interface:
51
+ This allows you to always be on the latest version when we release new builds
52
+ with automatic upgrades.
53
+
54
+ ![divider][divider]
55
+
56
+ ## 🔧 Installation
57
+
58
+ 1️⃣ Install the Crypto Library via [`npm`][8], [`yarn`][9] or [`pnpm`][10]
59
+ package managers:
40
60
 
41
61
  - `npm i @sebastienrousseau/crypto-lib`
42
62
  - `yarn add @sebastienrousseau/crypto-lib`
43
63
  - `pnpm add @sebastienrousseau/crypto-lib`
44
64
 
45
- ## What's included
65
+ For users who are unable to install the Crypto Lib, released builds can be
66
+ manually downloaded from this repository's
67
+ [Releases page](https://github.com/sebastienrousseau/crypto-service/releases/).
68
+
69
+ ### What's included
46
70
 
47
71
  Within the download you'll find all the crypto lib source files grouped into
48
72
  the *dist* folder.
@@ -51,48 +75,128 @@ You'll see something like this:
51
75
 
52
76
  ```shell
53
77
  .
78
+ ├── COPYRIGHT
79
+ ├── Makefile
80
+ ├── Report.txt
54
81
  ├── bin
55
82
  │   ├── crypto-lib.d.ts
56
83
  │   ├── crypto-lib.d.ts.map
57
84
  │   ├── crypto-lib.js
58
- │   └── crypto-lib.js.map
85
+ │   ├── crypto-lib.js.map
86
+ │   ├── cryptolib.d.ts
87
+ │   ├── cryptolib.d.ts.map
88
+ │   ├── cryptolib.js
89
+ │   └── cryptolib.js.map
90
+ ├── config
91
+ │   ├── config.d.ts
92
+ │   ├── config.d.ts.map
93
+ │   ├── config.js
94
+ │   └── config.js.map
95
+ ├── enums.d.ts
96
+ ├── enums.d.ts.map
97
+ ├── enums.js
98
+ ├── enums.js.map
59
99
  ├── index.d.ts
60
100
  ├── index.d.ts.map
61
101
  ├── index.js
62
102
  ├── index.js.map
63
- └── lib
64
- ├── decrypt.d.ts
65
- ├── decrypt.d.ts.map
66
- ├── decrypt.js
67
- ├── decrypt.js.map
68
- ├── encrypt.d.ts
69
- ├── encrypt.d.ts.map
70
- ├── encrypt.js
71
- ├── encrypt.js.map
72
- ├── generate.d.ts
73
- ├── generate.d.ts.map
74
- ├── generate.js
75
- ├── generate.js.map
76
- ├── revoke-key.d.ts
77
- ├── revoke-key.d.ts.map
78
- ├── revoke-key.js
79
- └── revoke-key.js.map
80
-
81
- 2 directories, 24 files
103
+ ├── key
104
+ │   ├── key.d.ts
105
+ │   ├── key.d.ts.map
106
+ │   ├── key.js
107
+ │   └── key.js.map
108
+ ├── lib
109
+ │   ├── decrypt.d.ts
110
+ │   ├── decrypt.d.ts.map
111
+ │   ├── decrypt.js
112
+ │   ├── decrypt.js.map
113
+ │   ├── encrypt.d.ts
114
+ │   ├── encrypt.d.ts.map
115
+ │   ├── encrypt.js
116
+ │   ├── encrypt.js.map
117
+ │   ├── generate.d.ts
118
+ │   ├── generate.d.ts.map
119
+ │   ├── generate.js
120
+ │   ├── generate.js.map
121
+ │   ├── generateSessionKey.d.ts
122
+ │   ├── generateSessionKey.d.ts.map
123
+ │   ├── generateSessionKey.js
124
+ │   ├── generateSessionKey.js.map
125
+ │   ├── index.d.ts
126
+ │   ├── index.d.ts.map
127
+ │   ├── index.js
128
+ │   ├── index.js.map
129
+ │   ├── reformat.d.ts
130
+ │   ├── reformat.d.ts.map
131
+ │   ├── reformat.js
132
+ │   ├── reformat.js.map
133
+ │   ├── revoke.d.ts
134
+ │   ├── revoke.d.ts.map
135
+ │   ├── revoke.js
136
+ │   ├── revoke.js.map
137
+ │   ├── session.d.ts
138
+ │   ├── session.d.ts.map
139
+ │   ├── session.js
140
+ │   ├── session.js.map
141
+ │   ├── sign.d.ts
142
+ │   ├── sign.d.ts.map
143
+ │   ├── sign.js
144
+ │   ├── sign.js.map
145
+ │   ├── verify.d.ts
146
+ │   ├── verify.d.ts.map
147
+ │   ├── verify.js
148
+ │   └── verify.js.map
149
+ ├── package.json
150
+ └── types
151
+ ├── types.d.ts
152
+ ├── types.d.ts.map
153
+ ├── types.js
154
+ └── types.js.map
155
+
156
+ 5 directories, 72 files
157
+
158
+ ```
159
+
160
+ 2️⃣ Set up your app
161
+
162
+ You can get started with a simple app by running the following in your terminal:
163
+
164
+ ```shell
165
+ > mkdir my-app
166
+ > cd my-app
167
+ > yarn add @sebastienrousseau/crypto-lib -D # or yarn or pnpm
168
+ > yarn start \
169
+ --name "Jane Doe" \
170
+ --email "jane@doe.com" \
171
+ --passphrase "123456789abcdef" \
172
+ --type "rsa" \
173
+ --curve "" \
174
+ --bits 2048 \
175
+ --expiration 0 \
176
+ --format armored \
82
177
 
83
178
  ```
84
179
 
85
- ## Quick Start
180
+ 3️⃣ Try it out and let us know what you think!
181
+
182
+ ![divider][divider]
183
+
184
+ ## ❯ Crypto Lib commands
185
+
186
+ The Crypto Lib accepts multiple types of options. Options are a list of flags
187
+ and other parameters that can control the behavior of the Crypto Lib as a whole.
188
+
189
+ Below is the full list of supported options for the Crypto Lib.
86
190
 
87
191
  ### Generating a new RSA key pair
88
192
 
89
193
  [RSA][11] is a public-key algorithm for encrypting and signing messages. To
90
194
  generate a Rivest-Shamir-Adelman (RSA) public key pair:
91
195
 
92
- - Open Terminal for Mac or Command Prompt for Windows,
196
+ - Open Terminal for Mac or Command Prompt for Windows,
93
197
 
94
- - Enter the following example command that will start the generation process in
95
- the `dist/` directory.
198
+ - Enter the following example command that will start the generation process
199
+ in the `dist/` directory.
96
200
 
97
201
  ```js
98
202
  yarn start \
@@ -136,9 +240,10 @@ Currently the following curves are supported:
136
240
 
137
241
  To generate an Elliptic Curve Cryptography (ECC) key pair:
138
242
 
139
- - Open Terminal for Mac or Command Prompt for Windows,
140
- - Enter the following example command that will start the generation process in
141
- the `dist/` directory.
243
+ - Open Terminal for Mac or Command Prompt for Windows,
244
+
245
+ - Enter the following example command that will start the generation process
246
+ in the `dist/` directory.
142
247
 
143
248
  ```js
144
249
  yarn start \
@@ -170,14 +275,16 @@ Crypto Lib makes it easy and painless to encrypt and sign data.
170
275
  To encrypt a message:
171
276
 
172
277
  - Open Terminal for Mac or Command Prompt for Windows,
278
+
173
279
  - Run the yarn start
174
- - Enter the following example command that will start the encryption process in
175
- the `dist/` directory.
280
+
281
+ - Enter the following example command that will start the encryption process
282
+ in the `dist/` directory.
176
283
 
177
284
  ```js
178
285
  node dist/lib/encrypt.js \
179
286
  --passphrase '123456789abcdef' \
180
- --message 'Hello Crypto Service APIs!'
287
+ --message 'Hello Crypto Service Suite APIs!'
181
288
  ```
182
289
 
183
290
  ***
@@ -190,9 +297,9 @@ Lib.
190
297
 
191
298
  To decrypt a message:
192
299
 
193
- - Open Terminal for Mac or Command Prompt for Windows,
194
- - Enter the following example command that will start the decryption process in
195
- the `dist/` directory.
300
+ - Open Terminal for Mac or Command Prompt for Windows,
301
+ - Enter the following example command that will start the decryption process
302
+ in the `dist/` directory.
196
303
 
197
304
  ```js
198
305
  node dist/lib/decrypt.js \
@@ -200,6 +307,54 @@ node dist/lib/decrypt.js \
200
307
  --message 'LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tCgp3Y0ZNQXpMNWFTdVU0RWM4QVEvL1RlZzN6bzFiMSszNW9lN3l6NDFpRS9LVlNZYUJYSEFESTNpbVJodlQKeXlRczdFc29iYTdoUUx4dFZESjEyc3ZNU25YUWk2Y1FVNXd4cGo1L3VENUFOT2ZuN0hVSkYrSExINlRNCjNBWktZNUFLRk40VUZBK0hQRy9GSHlaNVhxVzRLd0hpL3ZjVWxSejRreWJDc2VxYmZoY01hU0NJdHRKbwpmWkNOcTFZNEhiR1hBV1BQWXExV0tRZnl0RnRyWWlQODU3VE5hc21XNTJKUjVMQUZ5OFdzdnZNTmM3Z3AKQ0RFcUIyVWQwRmJSNEZOU2tvTXFhN3FScXFqS1V2ei9odU9ieVVsOW94RVpGVGNac1hwSVQ1QkE5WUtECmpvY1pVSE1hTjZkbnFJTk8rcWVBZWM4R1FjbEUxVVk0RWhNcEhjUktkZEJaY2pjaE0xbW9oaEMxb0Q4aQpUTVBlRU5XcDg0SGh3cVp1UjRNNmxUQjBqSUhZbytuMXpMbm0vRUFtcDdoc3VvSEFYY3pqSFhVYVE3M2IKOEZ5UWlENW1IMU1wWHRoWjVheXNRTklmRkY5TUdOQ1paWXExNitHSFQvbmJCTDNyUmU2dENCUUFRTnVaCksydnNQeThGZlJyYmVBR0llZHllOFZIUGJFYXNsNWF4TVBwc08yaUtjV3dNN1QvZjVaeG5FRUxWem5UeApHQnA5MHFKMUFUNGtVWVNOejYvZC9aT2JUVVV3WWdkKzdUNDdxQ3VTMjYxVlJpL0Jiblh1Z2pLRk90VlEKMEhpU1VKbTlCbGhFR2s3OWg3RGJuZmx0ZFc4dFRCNE9CdXJxUHRVaHRLS2hHL3JhYUY3YlFrVVowUktNCmQ0SllOM0sySmhBL2ovaHIySEE4ZUpWZ0NNVm9McXJyZW8xazNHbGxIWkxTd2RBQmJtaXpZL1JZd2JDUQpUeG91TW5KNjhvZmVtSHNrSW1MdGx2OUtBOElQVEY4UXp3enZRcmpNRGRtclg2V09QTGtKQ3JiV1JKbHcKV25NWlBkVGpzSzdicnVNOTByZXhLeFowSGZVL050V3BvZ251L3dOYVBHZ1NRbEZhdHZhclJFQlNEaExaCndNYVE2ZWkycUJLbXdDTGVERURlaU1BSWlSQVBad1d2R1Y2RlFWNW14V2xGdm9SaGRDeTc2TW5kWXNNTQoza1Nwb1doMVBYUWpWYWZLV2lhZHJJS2FOSllDZkY2bzE5Ty9NdlZITGFFV0tnM0lzRGtvMGdtQWZ5VE8KTngzb2dYdTV0VFpvelRyUzRUMUpsMUR3bnRZbGlrMWhINkNYK0ZGLzIzVzlHaHdTdlcreVgzZFlTeHZjCjFuMlBjVDY5QzdDTmZtcWpOT293d20wcjl6M0lWYlZ2dGk4ZFduVzNEZDVGS256d2VaUDhaZ2hudUl4SQptUzdrY0ZWTVd4d3p6SmptQjg3UGZPbmZtZ2k2b0NxbFRzMXJDRldTQVZqM3hzenFFRGRnT1B1QXcvdzQKWmZOSS9sSVhHdU1DakpKQlYzNTZCN2ExNkZacXVqK2ZtOUQwS1BYbGpjSEcydHFRTjVDbHVTUnhUZlBiCm42U3ZOZ2tkVTNGM3pYS3NxRW9iRzdzakg5WjZWZlJIZjlRcmN2ZXZHdWFIb2ZZQkROVzZmT3ZNODBURQpHNjkzS3BRdytEaDVnMzBzamhXbDRuMS9aZUROR0RYZ0dERGRUMU9WQXRrVTBTcm1vY0ZSM1hCUHprYnQKRmw3YlVkVG1oVFlHVys2VmRIUG9mOFZ0b1FrWVJma2YxK1hFaC9kNUFvTzdSSVZRQ29qb3pqTmhoVy9qCjg4VW56d0VqZ3VoK0VMbVFRS1ViUi9ydjg2djcyM0VtVkVSd3hvQTIvalZCbGVaaHpFOHdrY01HODM3VApLVlo3N0VHblRPcTBjbUkrang2Ri9SenRjbDRBUHN6eEJkUkVSM25HR3dqbGVIdjdpMndhQTYzbWNJLzcKM0I0dWZyVGczbHNMWDVlWVFDUnJrdXdwOVZKNzNlWmJiOTlLOU51ZDhNVGczNnE0cFhtNWRBd3ZLZzEwCm96c0t2MHVxa0tDclF1TFBWU1JtZkE9PQo9Yll1VQotLS0tLUVORCBQR1AgTUVTU0FHRS0tLS0tCg=='
201
308
  ```
202
309
 
310
+ ![divider][divider]
311
+
312
+ ## 🚥 Semantic Versioning Policy
313
+
314
+ For transparency into our release cycle and in striving to maintain backward
315
+ compatibility, `crypto-lib` follows [semantic versioning](http://semver.org/)
316
+ and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
317
+
318
+ ![divider][divider]
319
+
320
+ ## ✅ Changelog
321
+
322
+ - [GitHub Releases](https://github.com/sebastienrousseau/crypto-service/releases)
323
+
324
+ ![divider][divider]
325
+
326
+ ## ❤️ Contributing
327
+
328
+ Thank you for using Crypto Lib! If you like the library, it would be great if
329
+ you can give it a star ⭐ on [GitHub][5].
330
+
331
+ There are also many ways in which you can participate in this project, for
332
+ example:
333
+
334
+ * [Submit bugs and feature requests](https://github.com/sebastienrousseau/crypto-service/issues/new), and help us verify as they are checked in,
335
+ * Review [source code changes](https://github.com/sebastienrousseau/crypto-service/pulls), and help us improve our code quality,
336
+ * Review the [documentation](https://github.com/sebastienrousseau/crypto-service/docs) and make pull requests for anything from typos to additional and new content.
337
+
338
+ ![divider][divider]
339
+
340
+ ## 🥂 License
341
+
342
+ Copyright (c) Sebastien Rousseau. All rights reserved.
343
+
344
+ Licensed under the [MIT](LICENSE) license.
345
+
346
+ ![divider][divider]
347
+
348
+ ## 🏢 Acknowledgements
349
+
350
+ [Crypto Service Suite](https://crypto-service.co) is beautifully crafted by these
351
+ people and a bunch of awesome [contributors](https://github.com/sebastienrousseau/crypto-service/graphs/contributors).
352
+
353
+ | Contributors |
354
+ |---------|
355
+ |[![Sebastien Rousseau](https://avatars0.githubusercontent.com/u/1394998?s=117)](https://sebastienrousseau.co.uk)|
356
+ |[Sebastien Rousseau](https://github.com/sebastienrousseau)|
357
+
203
358
  [1]: https://openpgpjs.org/
204
359
  [2]: https://tools.ietf.org/html/rfc4880
205
360
  [3]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-10
@@ -212,3 +367,7 @@ node dist/lib/decrypt.js \
212
367
  [10]: https://pnpm.io/motivation
213
368
  [11]: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
214
369
  [12]: https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
370
+ [divider]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/divider.svg
371
+ [getting started]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/button-primary.svg
372
+ [download]: https://raw.githubusercontent.com/sebastienrousseau/crypto-service/master/assets/button-secondary.svg
373
+
package/dist/Report.txt CHANGED
@@ -1,72 +1,160 @@
1
- ┌─────────────────────────┬───────────┬────────────────┐
2
- │ File │ Size │ Size (gzipped) │
3
- ├─────────────────────────┼───────────┼────────────────┤
4
- │ COPYRIGHT │ 416 B │ 239 B │
5
- ├─────────────────────────┼───────────┼────────────────┤
6
- │ Makefile │ 2.73 kB │ 994 B │
7
- ├─────────────────────────┼───────────┼────────────────┤
8
- │ Report.txt │ 0 B │ 20 B │
9
- ├─────────────────────────┼───────────┼────────────────┤
10
- │ index.d.ts │ 103 B │ 107 B │
11
- ├─────────────────────────┼───────────┼────────────────┤
12
- │ index.d.ts.map │ 156 B │ 140 B │
13
- ├─────────────────────────┼───────────┼────────────────┤
14
- │ index.js │ 356 B │ 251 B │
15
- ├─────────────────────────┼───────────┼────────────────┤
16
- │ index.js.map │ 141 B │ 134 B │
17
- ├─────────────────────────┼───────────┼────────────────┤
18
- │ package.json │ 4.56 kB │ 1.49 kB │
19
- ├─────────────────────────┼───────────┼────────────────┤
20
- │ bin/crypto-lib.d.ts │ 308 B │ 183 B │
21
- ├─────────────────────────┼───────────┼────────────────┤
22
- │ bin/crypto-lib.d.ts.map │ 457 B │ 206 B │
23
- ├─────────────────────────┼───────────┼────────────────┤
24
- │ bin/crypto-lib.js │ 1.83 kB │ 769 B │
25
- ├─────────────────────────┼───────────┼────────────────┤
26
- │ bin/crypto-lib.js.map │ 918 B │ 348 B │
27
- ├─────────────────────────┼───────────┼────────────────┤
28
- │ lib/decrypt.d.ts │ 252 B │ 188 B │
29
- ├─────────────────────────┼───────────┼────────────────┤
30
- │ lib/decrypt.d.ts.map │ 265 B │ 190 B │
31
- ├─────────────────────────┼───────────┼────────────────┤
32
- │ lib/decrypt.js │ 2.44 kB │ 922 B │
33
- ├─────────────────────────┼───────────┼────────────────┤
34
- │ lib/decrypt.js.map │ 1.42 kB │ 503 B │
35
- ├─────────────────────────┼───────────┼────────────────┤
36
- │ lib/encrypt.d.ts │ 216 B │ 173 B │
37
- ├─────────────────────────┼───────────┼────────────────┤
38
- │ lib/encrypt.d.ts.map │ 265 B │ 189 B │
39
- ├─────────────────────────┼───────────┼────────────────┤
40
- │ lib/encrypt.js │ 2.35 kB │ 891 B │
41
- ├─────────────────────────┼───────────┼────────────────┤
42
- │ lib/encrypt.js.map │ 1.31 kB │ 474 B │
43
- ├─────────────────────────┼───────────┼────────────────┤
44
- │ lib/generate.d.ts │ 289 B │ 196 B │
45
- ├─────────────────────────┼───────────┼────────────────┤
46
- │ lib/generate.d.ts.map │ 424 B │ 220 B │
47
- ├─────────────────────────┼───────────┼────────────────┤
48
- │ lib/generate.js │ 2.11 kB │ 867 B │
49
- ├─────────────────────────┼───────────┼────────────────┤
50
- │ lib/generate.js.map │ 1.32 kB │ 427 B │
51
- ├─────────────────────────┼───────────┼────────────────┤
52
- │ lib/revoke.d.ts │ 137 B │ 135 B │
53
- ├─────────────────────────┼───────────┼────────────────┤
54
- │ lib/revoke.d.ts.map │ 201 B │ 166 B │
55
- ├─────────────────────────┼───────────┼────────────────┤
56
- │ lib/revoke.js │ 1.99 kB │ 815 B │
57
- ├─────────────────────────┼───────────┼────────────────┤
58
- │ lib/revoke.js.map │ 935 B │ 390 B │
59
- ├─────────────────────────┼───────────┼────────────────┤
60
- │ types/types.d.ts │ 35 B │ 55 B │
61
- ├─────────────────────────┼───────────┼────────────────┤
62
- │ types/types.d.ts.map │ 113 B │ 107 B │
63
- ├─────────────────────────┼───────────┼────────────────┤
64
- │ types/types.js │ 47 B │ 67 B │
65
- ├─────────────────────────┼───────────┼────────────────┤
66
- │ types/types.js.map │ 111 B │ 107 B │
67
- ├─────────────────────────┼───────────┼────────────────┤
68
- ├─────────────────────────┼───────────┼────────────────┤
69
- │ Total files: 32 │ 28.2 kB │ 12 kB │
70
- └─────────────────────────┴───────────┴────────────────┘
1
+ ┌────────────────────────┬───────────┬────────────────┐
2
+ │ File │ Size │ Size (gzipped) │
3
+ ├────────────────────────┼───────────┼────────────────┤
4
+ │ COPYRIGHT │ 416 B │ 239 B │
5
+ ├────────────────────────┼───────────┼────────────────┤
6
+ │ Makefile │ 2.73 kB │ 994 B │
7
+ ├────────────────────────┼───────────┼────────────────┤
8
+ │ Report.txt │ 0 B │ 20 B │
9
+ ├────────────────────────┼───────────┼────────────────┤
10
+ │ enums.d.ts │ 2.19 kB │ 531 B │
11
+ ├────────────────────────┼───────────┼────────────────┤
12
+ │ enums.d.ts.map │ 194 B │ 119 B │
13
+ ├────────────────────────┼───────────┼────────────────┤
14
+ │ enums.js │ 2.43 kB │ 677 B │
15
+ ├────────────────────────┼───────────┼────────────────┤
16
+ │ enums.js.map │ 1.68 kB │ 427 B │
17
+ ├────────────────────────┼───────────┼────────────────┤
18
+ │ index.d.ts │ 102 B │ 107 B │
19
+ ├────────────────────────┼───────────┼────────────────┤
20
+ │ index.d.ts.map │ 156 B │ 140 B │
21
+ ├────────────────────────┼───────────┼────────────────┤
22
+ │ index.js │ 353 B │ 248 B │
23
+ ├────────────────────────┼───────────┼────────────────┤
24
+ │ index.js.map │ 141 B │ 133 B │
25
+ ├────────────────────────┼───────────┼────────────────┤
26
+ │ package.json │ 5.22 kB │ 1.69 kB │
27
+ ├────────────────────────┼───────────┼────────────────┤
28
+ │ bin/cryptolib.d.ts │ 1.15 kB │ 404 B │
29
+ ├────────────────────────┼───────────┼────────────────┤
30
+ │ bin/cryptolib.d.ts.map │ 611 B │ 281 B │
31
+ ├────────────────────────┼───────────┼────────────────┤
32
+ │ bin/cryptolib.js │ 2.5 kB │ 804 B │
33
+ ├────────────────────────┼───────────┼────────────────┤
34
+ │ bin/cryptolib.js.map │ 1.42 kB │ 363 B │
35
+ ├────────────────────────┼───────────┼────────────────┤
36
+ │ config/config.d.ts │ 204 B │ 150 B │
37
+ ├────────────────────────┼───────────┼────────────────┤
38
+ │ config/config.d.ts.map │ 133 B │ 121 B │
39
+ ├────────────────────────┼───────────┼────────────────┤
40
+ │ config/config.js │ 529 B │ 317 B │
41
+ ├────────────────────────┼───────────┼────────────────┤
42
+ │ config/config.js.map │ 322 B │ 206 B │
43
+ ├────────────────────────┼───────────┼────────────────┤
44
+ │ data/decrypted.txt │ 33 B │ 53 B │
45
+ ├────────────────────────┼───────────┼────────────────┤
46
+ │ data/detached.sig │ 653 B │ 516 B │
47
+ ├────────────────────────┼───────────┼────────────────┤
48
+ │ data/encrypted.txt │ 1.3 kB │ 980 B │
49
+ ├────────────────────────┼───────────┼────────────────┤
50
+ │ data/signed.sig │ 756 B │ 582 B │
51
+ ├────────────────────────┼───────────┼────────────────┤
52
+ │ key/key.d.ts │ 584 B │ 214 B │
53
+ ├────────────────────────┼───────────┼────────────────┤
54
+ │ key/key.d.ts.map │ 321 B │ 195 B │
55
+ ├────────────────────────┼───────────┼────────────────┤
56
+ │ key/key.js │ 1.17 kB │ 364 B │
57
+ ├────────────────────────┼───────────┼────────────────┤
58
+ │ key/key.js.map │ 777 B │ 337 B │
59
+ ├────────────────────────┼───────────┼────────────────┤
60
+ │ key/rsa-reformat.cert │ 20 B │ 40 B │
61
+ ├────────────────────────┼───────────┼────────────────┤
62
+ │ key/rsa-reformat.key │ 20 B │ 40 B │
63
+ ├────────────────────────┼───────────┼────────────────┤
64
+ │ key/rsa-reformat.pub │ 20 B │ 40 B │
65
+ ├────────────────────────┼───────────┼────────────────┤
66
+ │ key/rsa-revoke.key │ 20 B │ 40 B │
67
+ ├────────────────────────┼───────────┼────────────────┤
68
+ │ key/rsa-revoke.pub │ 20 B │ 40 B │
69
+ ├────────────────────────┼───────────┼────────────────┤
70
+ │ key/rsa.cert │ 732 B │ 577 B │
71
+ ├────────────────────────┼───────────┼────────────────┤
72
+ │ key/rsa.key │ 5.38 kB │ 3.91 kB │
73
+ ├────────────────────────┼───────────┼────────────────┤
74
+ │ key/rsa.pub │ 2.87 kB │ 2.09 kB │
75
+ ├────────────────────────┼───────────┼────────────────┤
76
+ │ lib/decrypt.d.ts │ 178 B │ 149 B │
77
+ ├────────────────────────┼───────────┼────────────────┤
78
+ │ lib/decrypt.d.ts.map │ 237 B │ 181 B │
79
+ ├────────────────────────┼───────────┼────────────────┤
80
+ │ lib/decrypt.js │ 3.42 kB │ 1.19 kB │
81
+ ├────────────────────────┼───────────┼────────────────┤
82
+ │ lib/decrypt.js.map │ 2.29 kB │ 677 B │
83
+ ├────────────────────────┼───────────┼────────────────┤
84
+ │ lib/encrypt.d.ts │ 178 B │ 151 B │
85
+ ├────────────────────────┼───────────┼────────────────┤
86
+ │ lib/encrypt.d.ts.map │ 237 B │ 181 B │
87
+ ├────────────────────────┼───────────┼────────────────┤
88
+ │ lib/encrypt.js │ 3.05 kB │ 1.12 kB │
89
+ ├────────────────────────┼───────────┼────────────────┤
90
+ │ lib/encrypt.js.map │ 1.86 kB │ 615 B │
91
+ ├────────────────────────┼───────────┼────────────────┤
92
+ │ lib/generate.d.ts │ 181 B │ 151 B │
93
+ ├────────────────────────┼───────────┼────────────────┤
94
+ │ lib/generate.d.ts.map │ 254 B │ 190 B │
95
+ ├────────────────────────┼───────────┼────────────────┤
96
+ │ lib/generate.js │ 3.81 kB │ 1.25 kB │
97
+ ├────────────────────────┼───────────┼────────────────┤
98
+ │ lib/generate.js.map │ 2.91 kB │ 700 B │
99
+ ├────────────────────────┼───────────┼────────────────┤
100
+ │ lib/index.d.ts │ 413 B │ 188 B │
101
+ ├────────────────────────┼───────────┼────────────────┤
102
+ │ lib/index.d.ts.map │ 498 B │ 201 B │
103
+ ├────────────────────────┼───────────┼────────────────┤
104
+ │ lib/index.js │ 1.91 kB │ 675 B │
105
+ ├────────────────────────┼───────────┼────────────────┤
106
+ │ lib/index.js.map │ 330 B │ 212 B │
107
+ ├────────────────────────┼───────────┼────────────────┤
108
+ │ lib/reformat.d.ts │ 182 B │ 150 B │
109
+ ├────────────────────────┼───────────┼────────────────┤
110
+ │ lib/reformat.d.ts.map │ 238 B │ 181 B │
111
+ ├────────────────────────┼───────────┼────────────────┤
112
+ │ lib/reformat.js │ 3.92 kB │ 1.25 kB │
113
+ ├────────────────────────┼───────────┼────────────────┤
114
+ │ lib/reformat.js.map │ 2.69 kB │ 750 B │
115
+ ├────────────────────────┼───────────┼────────────────┤
116
+ │ lib/revoke.d.ts │ 237 B │ 177 B │
117
+ ├────────────────────────┼───────────┼────────────────┤
118
+ │ lib/revoke.d.ts.map │ 256 B │ 183 B │
119
+ ├────────────────────────┼───────────┼────────────────┤
120
+ │ lib/revoke.js │ 3.13 kB │ 1.11 kB │
121
+ ├────────────────────────┼───────────┼────────────────┤
122
+ │ lib/revoke.js.map │ 1.95 kB │ 603 B │
123
+ ├────────────────────────┼───────────┼────────────────┤
124
+ │ lib/session.d.ts │ 229 B │ 163 B │
125
+ ├────────────────────────┼───────────┼────────────────┤
126
+ │ lib/session.d.ts.map │ 277 B │ 192 B │
127
+ ├────────────────────────┼───────────┼────────────────┤
128
+ │ lib/session.js │ 2.59 kB │ 988 B │
129
+ ├────────────────────────┼───────────┼────────────────┤
130
+ │ lib/session.js.map │ 1.48 kB │ 520 B │
131
+ ├────────────────────────┼───────────┼────────────────┤
132
+ │ lib/sign.d.ts │ 166 B │ 144 B │
133
+ ├────────────────────────┼───────────┼────────────────┤
134
+ │ lib/sign.d.ts.map │ 216 B │ 171 B │
135
+ ├────────────────────────┼───────────┼────────────────┤
136
+ │ lib/sign.js │ 2.52 kB │ 975 B │
137
+ ├────────────────────────┼───────────┼────────────────┤
138
+ │ lib/sign.js.map │ 1.44 kB │ 524 B │
139
+ ├────────────────────────┼───────────┼────────────────┤
140
+ │ lib/verify.d.ts │ 274 B │ 195 B │
141
+ ├────────────────────────┼───────────┼────────────────┤
142
+ │ lib/verify.d.ts.map │ 256 B │ 182 B │
143
+ ├────────────────────────┼───────────┼────────────────┤
144
+ │ lib/verify.js │ 2.26 kB │ 900 B │
145
+ ├────────────────────────┼───────────┼────────────────┤
146
+ │ lib/verify.js.map │ 1.26 kB │ 477 B │
147
+ ├────────────────────────┼───────────┼────────────────┤
148
+ │ types/types.d.ts │ 1.04 kB │ 312 B │
149
+ ├────────────────────────┼───────────┼────────────────┤
150
+ │ types/types.d.ts.map │ 1.22 kB │ 327 B │
151
+ ├────────────────────────┼───────────┼────────────────┤
152
+ │ types/types.js │ 110 B │ 124 B │
153
+ ├────────────────────────┼───────────┼────────────────┤
154
+ │ types/types.js.map │ 111 B │ 107 B │
155
+ ├────────────────────────┼───────────┼────────────────┤
156
+ ├────────────────────────┼───────────┼────────────────┤
157
+ │ Total files: 76 │ 87 kB │ 36.5 kB │
158
+ └────────────────────────┴───────────┴────────────────┘
71
159
 
72
160
 
@@ -0,0 +1,23 @@
1
+ import { dataDecrypt, dataEncrypt, dataGenerate, dataReformat, dataRevoke, dataSessionKey, dataSign, dataVerify } from "../types/types";
2
+ export declare function decrypt(data: dataDecrypt): Promise<object>;
3
+ export declare function encrypt(data: dataEncrypt): Promise<object>;
4
+ export declare function generate(data: dataGenerate): Promise<object>;
5
+ export declare function reformat(data: dataReformat): Promise<object>;
6
+ export declare function session(data: dataSessionKey): Promise<import("openpgp").SessionKey>;
7
+ export declare function revoke(data: dataRevoke): Promise<import("openpgp").SerializedKeyPair<string>>;
8
+ export declare function sign(data: dataSign): Promise<string>;
9
+ export declare function verify(data: dataVerify): Promise<import("openpgp").VerifyMessageResult & {
10
+ data: import("openpgp").WebStream<string>;
11
+ }>;
12
+ declare const _default: {
13
+ decrypt: typeof decrypt;
14
+ encrypt: typeof encrypt;
15
+ generate: typeof generate;
16
+ reformat: typeof reformat;
17
+ revoke: typeof revoke;
18
+ session: typeof session;
19
+ sign: typeof sign;
20
+ verify: typeof verify;
21
+ };
22
+ export default _default;
23
+ //# sourceMappingURL=cryptolib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cryptolib.d.ts","sourceRoot":"","sources":["../../src/bin/cryptolib.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,QAAQ,EACR,UAAU,EACX,MAAM,gBAAgB,CAAC;AAqBxB,wBAAsB,OAAO,CAAC,IAAI,EAAE,WAAW,mBAG9C;AAqBD,wBAAsB,OAAO,CAAC,IAAI,EAAE,WAAW,mBAG9C;AA2BD,wBAAsB,QAAQ,CAAC,IAAI,EAAE,YAAY,mBAGhD;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,YAAY,mBAGhD;AAuBD,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,yCAGjD;AAmBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU,wDAG5C;AAoBD,wBAAsB,IAAI,CAAC,IAAI,EAAE,QAAQ,mBAGxC;AAoBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU;;GAG5C;;;;;;;;;;;AAUD,wBASE"}