@sequencemedia/crypto 1.1.13 → 1.1.15
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/README.md +20 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,12 @@ import {
|
|
|
16
16
|
### `encrypt`
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
|
-
function encrypt(
|
|
19
|
+
function encrypt(
|
|
20
|
+
buffer: Buffer,
|
|
21
|
+
secret: string,
|
|
22
|
+
bytes?: number,
|
|
23
|
+
algorithm?: string
|
|
24
|
+
): Buffer
|
|
20
25
|
```
|
|
21
26
|
|
|
22
27
|
Only `buffer` and `secret` are _required_
|
|
@@ -32,7 +37,12 @@ Both `bytes` and `algorithm` are _optional_
|
|
|
32
37
|
### `decrypt`
|
|
33
38
|
|
|
34
39
|
```typescript
|
|
35
|
-
function decrypt(
|
|
40
|
+
function decrypt(
|
|
41
|
+
buffer: Buffer,
|
|
42
|
+
secret: string,
|
|
43
|
+
bytes?: number,
|
|
44
|
+
algorithm?: string
|
|
45
|
+
): Buffer
|
|
36
46
|
```
|
|
37
47
|
|
|
38
48
|
Only `buffer` and `secret` are _required_
|
|
@@ -91,7 +101,10 @@ Requires `CRYPTO_KEY` as a _variable_ in the Bash environment
|
|
|
91
101
|
- A file _destination_ path to put the encrypted data
|
|
92
102
|
|
|
93
103
|
```bash
|
|
94
|
-
CRYPTO_KEY='secret'
|
|
104
|
+
CRYPTO_KEY='secret'
|
|
105
|
+
./encrypt.sh \
|
|
106
|
+
--origin "./file.txt" \
|
|
107
|
+
--destination "./encrypted.txt"
|
|
95
108
|
```
|
|
96
109
|
|
|
97
110
|
### `decrypt.sh`
|
|
@@ -102,5 +115,8 @@ Requires `CRYPTO_KEY` as a _variable_ in the Bash environment
|
|
|
102
115
|
- A file _destination_ path to put the decrypted data
|
|
103
116
|
|
|
104
117
|
```bash
|
|
105
|
-
CRYPTO_KEY='secret'
|
|
118
|
+
CRYPTO_KEY='secret'
|
|
119
|
+
./decrypt.sh \
|
|
120
|
+
--origin "./encrypted.txt" \
|
|
121
|
+
--destination "./file.txt"
|
|
106
122
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/crypto",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"crypto",
|
|
6
6
|
"node",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@babel/core": "^7.21.4",
|
|
41
41
|
"@babel/eslint-parser": "^7.21.3",
|
|
42
42
|
"@babel/preset-env": "^7.21.4",
|
|
43
|
-
"@sequencemedia/hooks": "^1.0.
|
|
43
|
+
"@sequencemedia/hooks": "^1.0.391",
|
|
44
44
|
"@types/node": "^18.15.11",
|
|
45
45
|
"core-js": "^3.30.1",
|
|
46
46
|
"eslint": "^8.38.0",
|