n8n-nodes-boltx-crypto 0.1.0 → 0.2.0
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.
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.Crypto = void 0;
|
|
37
37
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
38
38
|
const crypto = __importStar(require("crypto"));
|
|
39
|
+
const bcrypt = __importStar(require("bcryptjs"));
|
|
39
40
|
function toBytes(s, enc) {
|
|
40
41
|
switch (enc) {
|
|
41
42
|
case 'base64':
|
|
@@ -56,8 +57,8 @@ class Crypto {
|
|
|
56
57
|
icon: 'file:crypto.svg',
|
|
57
58
|
group: ['transform'],
|
|
58
59
|
version: 1,
|
|
59
|
-
subtitle: '={{ $parameter["operation"]
|
|
60
|
-
description: '
|
|
60
|
+
subtitle: '={{ $parameter["operation"] }}',
|
|
61
|
+
description: 'AES-CBC decrypt + bcrypt hash/compare động per-item. Khớp type với goworker.',
|
|
61
62
|
defaults: { name: 'Crypto (BoltX)' },
|
|
62
63
|
inputs: ['main'],
|
|
63
64
|
outputs: ['main'],
|
|
@@ -69,6 +70,8 @@ class Crypto {
|
|
|
69
70
|
noDataExpression: true,
|
|
70
71
|
options: [
|
|
71
72
|
{ name: 'AES Decrypt', value: 'aesDecrypt', description: 'Giải mã AES-CBC (PKCS7)' },
|
|
73
|
+
{ name: 'Bcrypt Hash', value: 'bcryptHash', description: 'Băm mật khẩu (parity bcryptjs.hashSync)' },
|
|
74
|
+
{ name: 'Bcrypt Compare', value: 'bcryptCompare', description: 'So khớp mật khẩu với hash (parity bcryptjs.compareSync)' },
|
|
72
75
|
],
|
|
73
76
|
default: 'aesDecrypt',
|
|
74
77
|
},
|
|
@@ -83,6 +86,7 @@ class Crypto {
|
|
|
83
86
|
],
|
|
84
87
|
default: 'aes-128-cbc',
|
|
85
88
|
description: 'Thuật toán AES-CBC. Độ dài key phải khớp (16/24/32 byte sau khi decode).',
|
|
89
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
86
90
|
},
|
|
87
91
|
{
|
|
88
92
|
displayName: 'Data (ciphertext)',
|
|
@@ -92,6 +96,7 @@ class Crypto {
|
|
|
92
96
|
default: '',
|
|
93
97
|
placeholder: '={{ $json.body.data }}',
|
|
94
98
|
description: 'Chuỗi đã mã hoá. Encoding khai báo ở "Input Encoding".',
|
|
99
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
95
100
|
},
|
|
96
101
|
{
|
|
97
102
|
displayName: 'Input Encoding',
|
|
@@ -105,6 +110,7 @@ class Crypto {
|
|
|
105
110
|
],
|
|
106
111
|
default: 'base64',
|
|
107
112
|
description: 'Encoding của Data.',
|
|
113
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
108
114
|
},
|
|
109
115
|
{
|
|
110
116
|
displayName: 'Key',
|
|
@@ -114,6 +120,7 @@ class Crypto {
|
|
|
114
120
|
default: '',
|
|
115
121
|
placeholder: '={{ $json.aes_key }}',
|
|
116
122
|
description: 'Key AES. Encoding khai báo ở "Key Encoding". Hỗ trợ expression đọc từ DB row.',
|
|
123
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
117
124
|
},
|
|
118
125
|
{
|
|
119
126
|
displayName: 'Key Encoding',
|
|
@@ -126,6 +133,7 @@ class Crypto {
|
|
|
126
133
|
{ name: 'utf8', value: 'utf8' },
|
|
127
134
|
],
|
|
128
135
|
default: 'base64',
|
|
136
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
129
137
|
},
|
|
130
138
|
{
|
|
131
139
|
displayName: 'IV',
|
|
@@ -135,6 +143,7 @@ class Crypto {
|
|
|
135
143
|
default: '',
|
|
136
144
|
placeholder: '={{ $json.aes_iv }}',
|
|
137
145
|
description: 'Initialization vector. Encoding khai báo ở "IV Encoding".',
|
|
146
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
138
147
|
},
|
|
139
148
|
{
|
|
140
149
|
displayName: 'IV Encoding',
|
|
@@ -147,6 +156,7 @@ class Crypto {
|
|
|
147
156
|
{ name: 'utf8', value: 'utf8' },
|
|
148
157
|
],
|
|
149
158
|
default: 'base64',
|
|
159
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
150
160
|
},
|
|
151
161
|
{
|
|
152
162
|
displayName: 'Parse Plaintext as JSON',
|
|
@@ -154,6 +164,7 @@ class Crypto {
|
|
|
154
164
|
type: 'boolean',
|
|
155
165
|
default: true,
|
|
156
166
|
description: 'Whether to parse the decrypted text as a JSON object and output its fields directly. Nếu tắt: output { data: plaintext }.',
|
|
167
|
+
displayOptions: { show: { operation: ['aesDecrypt'] } },
|
|
157
168
|
},
|
|
158
169
|
{
|
|
159
170
|
displayName: 'Output Encoding',
|
|
@@ -166,18 +177,70 @@ class Crypto {
|
|
|
166
177
|
],
|
|
167
178
|
default: 'utf8',
|
|
168
179
|
description: 'Encoding của plaintext khi không parse JSON.',
|
|
169
|
-
displayOptions: { show: { jsonParse: [false] } },
|
|
180
|
+
displayOptions: { show: { operation: ['aesDecrypt'], jsonParse: [false] } },
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
displayName: 'Password',
|
|
184
|
+
name: 'password',
|
|
185
|
+
type: 'string',
|
|
186
|
+
typeOptions: { password: true },
|
|
187
|
+
default: '',
|
|
188
|
+
placeholder: '={{ $json.body.password }}',
|
|
189
|
+
description: 'Mật khẩu plaintext. bcrypt cắt còn 72 byte.',
|
|
190
|
+
displayOptions: { show: { operation: ['bcryptHash', 'bcryptCompare'] } },
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
displayName: 'Cost',
|
|
194
|
+
name: 'cost',
|
|
195
|
+
type: 'number',
|
|
196
|
+
typeOptions: { minValue: 4, maxValue: 31 },
|
|
197
|
+
default: 10,
|
|
198
|
+
description: 'Cost factor (4–31). Mặc định 10 = bcryptjs default.',
|
|
199
|
+
displayOptions: { show: { operation: ['bcryptHash'] } },
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
displayName: 'Hash',
|
|
203
|
+
name: 'hash',
|
|
204
|
+
type: 'string',
|
|
205
|
+
default: '',
|
|
206
|
+
placeholder: '={{ $json.password }}',
|
|
207
|
+
description: 'Hash đã lưu ($2a/$2b...) để so khớp.',
|
|
208
|
+
displayOptions: { show: { operation: ['bcryptCompare'] } },
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
displayName: 'Output Field',
|
|
212
|
+
name: 'outputField',
|
|
213
|
+
type: 'string',
|
|
214
|
+
default: '',
|
|
215
|
+
placeholder: 'hash | valid',
|
|
216
|
+
description: 'Tên field chứa kết quả. Để trống: "hash" (Bcrypt Hash) / "valid" (Bcrypt Compare).',
|
|
217
|
+
displayOptions: { show: { operation: ['bcryptHash', 'bcryptCompare'] } },
|
|
170
218
|
},
|
|
171
219
|
],
|
|
172
220
|
};
|
|
173
221
|
}
|
|
174
222
|
async execute() {
|
|
175
|
-
var _a, _b, _c;
|
|
223
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
176
224
|
const items = this.getInputData();
|
|
177
225
|
const out = [];
|
|
178
226
|
for (let i = 0; i < items.length; i++) {
|
|
179
227
|
try {
|
|
180
228
|
const operation = this.getNodeParameter('operation', i, 'aesDecrypt');
|
|
229
|
+
if (operation === 'bcryptHash') {
|
|
230
|
+
const password = String((_a = this.getNodeParameter('password', i, '')) !== null && _a !== void 0 ? _a : '');
|
|
231
|
+
const cost = Number(this.getNodeParameter('cost', i, 10)) || 10;
|
|
232
|
+
const field = String((_b = this.getNodeParameter('outputField', i, '')) !== null && _b !== void 0 ? _b : '').trim() || 'hash';
|
|
233
|
+
out.push({ json: { [field]: bcrypt.hashSync(password, cost) }, pairedItem: { item: i } });
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
if (operation === 'bcryptCompare') {
|
|
237
|
+
const password = String((_c = this.getNodeParameter('password', i, '')) !== null && _c !== void 0 ? _c : '');
|
|
238
|
+
const hash = String((_d = this.getNodeParameter('hash', i, '')) !== null && _d !== void 0 ? _d : '');
|
|
239
|
+
const field = String((_e = this.getNodeParameter('outputField', i, '')) !== null && _e !== void 0 ? _e : '').trim() || 'valid';
|
|
240
|
+
const valid = hash ? bcrypt.compareSync(password, hash) : false;
|
|
241
|
+
out.push({ json: { [field]: valid }, pairedItem: { item: i } });
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
181
244
|
if (operation !== 'aesDecrypt') {
|
|
182
245
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `operation ${operation} chưa hỗ trợ`, { itemIndex: i });
|
|
183
246
|
}
|
|
@@ -186,9 +249,9 @@ class Crypto {
|
|
|
186
249
|
const keyEncoding = this.getNodeParameter('keyEncoding', i, 'base64');
|
|
187
250
|
const ivEncoding = this.getNodeParameter('ivEncoding', i, 'base64');
|
|
188
251
|
const jsonParse = this.getNodeParameter('jsonParse', i, true);
|
|
189
|
-
const dataRaw = String((
|
|
190
|
-
const keyRaw = String((
|
|
191
|
-
const ivRaw = String((
|
|
252
|
+
const dataRaw = String((_f = this.getNodeParameter('data', i, '')) !== null && _f !== void 0 ? _f : '');
|
|
253
|
+
const keyRaw = String((_g = this.getNodeParameter('key', i, '')) !== null && _g !== void 0 ? _g : '').trim();
|
|
254
|
+
const ivRaw = String((_h = this.getNodeParameter('iv', i, '')) !== null && _h !== void 0 ? _h : '').trim();
|
|
192
255
|
if (!keyRaw) {
|
|
193
256
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'crypto: key rỗng', { itemIndex: i });
|
|
194
257
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Crypto.node.js","sourceRoot":"","sources":["../../../nodes/Crypto/Crypto.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAOsB;AACtB,+CAAiC;
|
|
1
|
+
{"version":3,"file":"Crypto.node.js","sourceRoot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|
|
4
|
-
"description": "n8n community node —
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "n8n community node — AES-CBC decrypt (aes-128/192/256) + bcrypt hash/compare, key/data động per-item (multi-tenant). Khớp type với goworker custom executor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
7
7
|
"n8n",
|
|
8
8
|
"crypto",
|
|
9
9
|
"aes",
|
|
10
|
+
"bcrypt",
|
|
10
11
|
"ekyc",
|
|
11
12
|
"boltx"
|
|
12
13
|
],
|
|
@@ -33,6 +34,9 @@
|
|
|
33
34
|
"files": [
|
|
34
35
|
"dist"
|
|
35
36
|
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"bcryptjs": "^2.4.3"
|
|
39
|
+
},
|
|
36
40
|
"n8n": {
|
|
37
41
|
"n8nNodesApiVersion": 1,
|
|
38
42
|
"credentials": [],
|
|
@@ -41,6 +45,7 @@
|
|
|
41
45
|
]
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
48
|
+
"@types/bcryptjs": "^2.4.6",
|
|
44
49
|
"@types/node": "^20.10.0",
|
|
45
50
|
"@typescript-eslint/parser": "^7.15.0",
|
|
46
51
|
"eslint": "^8.56.0",
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-boltx-crypto",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "n8n community node —
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "n8n community node — AES-CBC decrypt (aes-128/192/256) + bcrypt hash/compare, key/data động per-item (multi-tenant). Khớp type với goworker custom executor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
7
7
|
"n8n",
|
|
8
8
|
"crypto",
|
|
9
9
|
"aes",
|
|
10
|
+
"bcrypt",
|
|
10
11
|
"ekyc",
|
|
11
12
|
"boltx"
|
|
12
13
|
],
|
|
@@ -33,6 +34,9 @@
|
|
|
33
34
|
"files": [
|
|
34
35
|
"dist"
|
|
35
36
|
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"bcryptjs": "^2.4.3"
|
|
39
|
+
},
|
|
36
40
|
"n8n": {
|
|
37
41
|
"n8nNodesApiVersion": 1,
|
|
38
42
|
"credentials": [],
|
|
@@ -41,6 +45,7 @@
|
|
|
41
45
|
]
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
48
|
+
"@types/bcryptjs": "^2.4.6",
|
|
44
49
|
"@types/node": "^20.10.0",
|
|
45
50
|
"@typescript-eslint/parser": "^7.15.0",
|
|
46
51
|
"eslint": "^8.56.0",
|