@digitaldefiance/node-ecies-lib 4.12.7 → 4.12.8
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/package.json +3 -2
- package/src/services/crc.d.ts +87 -0
- package/src/services/crc.d.ts.map +1 -0
- package/src/services/crc.js +198 -0
- package/src/services/crc.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/node-ecies-lib",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.8",
|
|
4
4
|
"description": "Digital Defiance Node ECIES Library",
|
|
5
5
|
"homepage": "https://github.com/Digital-Defiance/node-ecies-lib",
|
|
6
6
|
"repository": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"packageManager": "yarn@4.10.3",
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@digitaldefiance/ecies-lib": "4.12.
|
|
65
|
+
"@digitaldefiance/ecies-lib": "4.12.8",
|
|
66
66
|
"@digitaldefiance/express-suite-test-utils": "1.0.14",
|
|
67
67
|
"@digitaldefiance/i18n-lib": "3.8.16",
|
|
68
68
|
"@ethereumjs/wallet": "^10.0.0",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"@noble/hashes": "1.8.0",
|
|
71
71
|
"@scure/bip32": "1.7.0",
|
|
72
72
|
"bson": "^6.10.4",
|
|
73
|
+
"crc": "^4.3.2",
|
|
73
74
|
"ethereum-cryptography": "^3.2.0",
|
|
74
75
|
"js-sha3": "^0.9.3",
|
|
75
76
|
"paillier-bigint": "^3.4.1",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
export declare class CrcService {
|
|
3
|
+
/**
|
|
4
|
+
* Perform a CRC8 checksum on the data
|
|
5
|
+
* @param data - The data to checksum
|
|
6
|
+
* @returns The CRC8 checksum as a Buffer
|
|
7
|
+
*/
|
|
8
|
+
crc8(data: Buffer): Buffer;
|
|
9
|
+
/**
|
|
10
|
+
* Calculates the CRC8 of a buffer or readable stream
|
|
11
|
+
* @param input - The buffer or readable stream to calculate the CRC8 of
|
|
12
|
+
* @returns The CRC8 as a Buffer
|
|
13
|
+
*/
|
|
14
|
+
crc8Async(input: Buffer | Readable): Promise<Buffer>;
|
|
15
|
+
/**
|
|
16
|
+
* Verify a CRC8 checksum on the data
|
|
17
|
+
* @param data - The data to verify
|
|
18
|
+
* @param expectedCrc - The expected CRC8 checksum
|
|
19
|
+
* @returns True if the checksum matches, false otherwise
|
|
20
|
+
*/
|
|
21
|
+
verifyCrc8(data: Buffer, expectedCrc: Buffer | number): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Validates a CRC8 against a buffer or readable stream
|
|
24
|
+
* @param data The data to validate
|
|
25
|
+
* @param expectedCrc8 The CRC8 to validate against
|
|
26
|
+
* @returns True if the CRC8 is valid, false otherwise
|
|
27
|
+
*/
|
|
28
|
+
verifyCrc8Async(data: Buffer | Readable, expectedCrc8: Buffer): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Perform a CRC16 checksum on the data
|
|
31
|
+
* @param data - The data to checksum
|
|
32
|
+
* @returns The CRC16 checksum as a Buffer
|
|
33
|
+
*/
|
|
34
|
+
crc16(data: Buffer): Buffer;
|
|
35
|
+
/**
|
|
36
|
+
* Calculates the CRC16 of a buffer or readable stream
|
|
37
|
+
* @param input - The buffer or readable stream to calculate the CRC16 of
|
|
38
|
+
* @returns The CRC16 as a Buffer
|
|
39
|
+
*/
|
|
40
|
+
crc16Async(input: Buffer | Readable): Promise<Buffer>;
|
|
41
|
+
/**
|
|
42
|
+
* Verify a CRC16 checksum on the data
|
|
43
|
+
* @param data - The data to verify
|
|
44
|
+
* @param expectedCrc - The expected CRC16 checksum
|
|
45
|
+
* @returns True if the checksum matches, false otherwise
|
|
46
|
+
*/
|
|
47
|
+
verifyCrc16(data: Buffer, expectedCrc: Buffer | number): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Validates a CRC16 against a buffer or readable stream
|
|
50
|
+
* @param data The data to validate
|
|
51
|
+
* @param expectedCrc16 The CRC16 to validate against
|
|
52
|
+
* @returns True if the CRC16 is valid, false otherwise
|
|
53
|
+
*/
|
|
54
|
+
verifyCrc16Async(data: Buffer | Readable, expectedCrc16: Buffer): Promise<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* Perform a CRC32 checksum on the data
|
|
57
|
+
* @param data - The data to checksum
|
|
58
|
+
* @returns The CRC32 checksum as a Buffer
|
|
59
|
+
*/
|
|
60
|
+
crc32(data: Buffer): Buffer;
|
|
61
|
+
/**
|
|
62
|
+
* Calculates the CRC32 of a buffer or readable stream
|
|
63
|
+
* @param input - The buffer or readable stream to calculate the CRC32 of
|
|
64
|
+
* @returns The CRC32 as a number
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* Calculates the CRC32 of a buffer or readable stream
|
|
68
|
+
* @param input - The buffer or readable stream to calculate the CRC32 of
|
|
69
|
+
* @returns The CRC32 as a Buffer
|
|
70
|
+
*/
|
|
71
|
+
crc32Async(input: Buffer | Readable): Promise<Buffer>;
|
|
72
|
+
/**
|
|
73
|
+
* Verify a CRC32 checksum on the data
|
|
74
|
+
* @param data - The data to verify
|
|
75
|
+
* @param expectedCrc - The expected CRC32 checksum
|
|
76
|
+
* @returns True if the checksum matches, false otherwise
|
|
77
|
+
*/
|
|
78
|
+
verifyCrc32(data: Buffer, expectedCrc: Buffer | number): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Validates a CRC32 against a buffer or readable stream
|
|
81
|
+
* @param data The data to validate
|
|
82
|
+
* @param expectedCrc32 The CRC32 to validate against
|
|
83
|
+
* @returns True if the CRC32 is valid, false otherwise
|
|
84
|
+
*/
|
|
85
|
+
verifyCrc32Async(data: Buffer | Readable, expectedCrc32: Buffer): Promise<boolean>;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL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,MAAM,GAAG,OAAO;IASvE;;;;;OAKG;IACU,gBAAgB,CAC3B,IAAI,EAAE,MAAM,GAAG,QAAQ,EACvB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;CAIpB"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CrcService = void 0;
|
|
4
|
+
const crc_1 = require("crc");
|
|
5
|
+
class CrcService {
|
|
6
|
+
/**
|
|
7
|
+
* Perform a CRC8 checksum on the data
|
|
8
|
+
* @param data - The data to checksum
|
|
9
|
+
* @returns The CRC8 checksum as a Buffer
|
|
10
|
+
*/
|
|
11
|
+
crc8(data) {
|
|
12
|
+
const crc8buf = Buffer.alloc(1);
|
|
13
|
+
const crc8value = (0, crc_1.crc8)(data);
|
|
14
|
+
crc8buf.writeUInt8(crc8value);
|
|
15
|
+
return crc8buf;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Calculates the CRC8 of a buffer or readable stream
|
|
19
|
+
* @param input - The buffer or readable stream to calculate the CRC8 of
|
|
20
|
+
* @returns The CRC8 as a Buffer
|
|
21
|
+
*/
|
|
22
|
+
async crc8Async(input) {
|
|
23
|
+
if (Buffer.isBuffer(input)) {
|
|
24
|
+
return Promise.resolve(this.crc8(input));
|
|
25
|
+
}
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
let crc8value = (0, crc_1.crc8)(Buffer.alloc(0)); // Initialize with empty buffer
|
|
28
|
+
input.on('data', (chunk) => {
|
|
29
|
+
const tempBuf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
30
|
+
crc8value = (0, crc_1.crc8)(tempBuf, crc8value);
|
|
31
|
+
});
|
|
32
|
+
input.on('end', () => {
|
|
33
|
+
const crc8buf = Buffer.alloc(1);
|
|
34
|
+
crc8buf.writeUInt8(crc8value);
|
|
35
|
+
resolve(crc8buf);
|
|
36
|
+
});
|
|
37
|
+
input.on('error', (error) => {
|
|
38
|
+
reject(error);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Verify a CRC8 checksum on the data
|
|
44
|
+
* @param data - The data to verify
|
|
45
|
+
* @param expectedCrc - The expected CRC8 checksum
|
|
46
|
+
* @returns True if the checksum matches, false otherwise
|
|
47
|
+
*/
|
|
48
|
+
verifyCrc8(data, expectedCrc) {
|
|
49
|
+
const crc8value = (0, crc_1.crc8)(data);
|
|
50
|
+
if (typeof expectedCrc === 'number') {
|
|
51
|
+
return crc8value === expectedCrc;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
const expectedCrc8 = expectedCrc.readUInt8();
|
|
55
|
+
return crc8value === expectedCrc8;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Validates a CRC8 against a buffer or readable stream
|
|
60
|
+
* @param data The data to validate
|
|
61
|
+
* @param expectedCrc8 The CRC8 to validate against
|
|
62
|
+
* @returns True if the CRC8 is valid, false otherwise
|
|
63
|
+
*/
|
|
64
|
+
async verifyCrc8Async(data, expectedCrc8) {
|
|
65
|
+
const calculatedCrc8 = await this.crc8Async(data);
|
|
66
|
+
return calculatedCrc8.equals(expectedCrc8);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Perform a CRC16 checksum on the data
|
|
70
|
+
* @param data - The data to checksum
|
|
71
|
+
* @returns The CRC16 checksum as a Buffer
|
|
72
|
+
*/
|
|
73
|
+
crc16(data) {
|
|
74
|
+
const crc16buf = Buffer.alloc(2);
|
|
75
|
+
const crc16value = (0, crc_1.crc16ccitt)(data); // For CRC16-CCITT-FALSE
|
|
76
|
+
crc16buf.writeUInt16BE(crc16value);
|
|
77
|
+
return crc16buf;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Calculates the CRC16 of a buffer or readable stream
|
|
81
|
+
* @param input - The buffer or readable stream to calculate the CRC16 of
|
|
82
|
+
* @returns The CRC16 as a Buffer
|
|
83
|
+
*/
|
|
84
|
+
async crc16Async(input) {
|
|
85
|
+
if (Buffer.isBuffer(input)) {
|
|
86
|
+
return Promise.resolve(this.crc16(input));
|
|
87
|
+
}
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
let crc16value = (0, crc_1.crc16ccitt)(Buffer.alloc(0)); // Initialize with empty buffer
|
|
90
|
+
input.on('data', (chunk) => {
|
|
91
|
+
const tempBuf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
92
|
+
crc16value = (0, crc_1.crc16ccitt)(tempBuf, crc16value);
|
|
93
|
+
});
|
|
94
|
+
input.on('end', () => {
|
|
95
|
+
const crc16buf = Buffer.alloc(2);
|
|
96
|
+
crc16buf.writeUInt16BE(crc16value);
|
|
97
|
+
resolve(crc16buf);
|
|
98
|
+
});
|
|
99
|
+
input.on('error', (error) => {
|
|
100
|
+
reject(error);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Verify a CRC16 checksum on the data
|
|
106
|
+
* @param data - The data to verify
|
|
107
|
+
* @param expectedCrc - The expected CRC16 checksum
|
|
108
|
+
* @returns True if the checksum matches, false otherwise
|
|
109
|
+
*/
|
|
110
|
+
verifyCrc16(data, expectedCrc) {
|
|
111
|
+
const crc16value = (0, crc_1.crc16ccitt)(data); // For CRC16-CCITT-FALSE
|
|
112
|
+
if (typeof expectedCrc === 'number') {
|
|
113
|
+
return crc16value === expectedCrc;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const expectedCrc16 = expectedCrc.readUInt16BE();
|
|
117
|
+
return crc16value === expectedCrc16;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Validates a CRC16 against a buffer or readable stream
|
|
122
|
+
* @param data The data to validate
|
|
123
|
+
* @param expectedCrc16 The CRC16 to validate against
|
|
124
|
+
* @returns True if the CRC16 is valid, false otherwise
|
|
125
|
+
*/
|
|
126
|
+
async verifyCrc16Async(data, expectedCrc16) {
|
|
127
|
+
const calculatedCrc16 = await this.crc16Async(data);
|
|
128
|
+
return calculatedCrc16.equals(expectedCrc16);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Perform a CRC32 checksum on the data
|
|
132
|
+
* @param data - The data to checksum
|
|
133
|
+
* @returns The CRC32 checksum as a Buffer
|
|
134
|
+
*/
|
|
135
|
+
crc32(data) {
|
|
136
|
+
const crc32value = (0, crc_1.crc32)(data);
|
|
137
|
+
const crc32buf = Buffer.alloc(4);
|
|
138
|
+
crc32buf.writeUInt32BE(crc32value);
|
|
139
|
+
return crc32buf;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Calculates the CRC32 of a buffer or readable stream
|
|
143
|
+
* @param input - The buffer or readable stream to calculate the CRC32 of
|
|
144
|
+
* @returns The CRC32 as a number
|
|
145
|
+
*/
|
|
146
|
+
/**
|
|
147
|
+
* Calculates the CRC32 of a buffer or readable stream
|
|
148
|
+
* @param input - The buffer or readable stream to calculate the CRC32 of
|
|
149
|
+
* @returns The CRC32 as a Buffer
|
|
150
|
+
*/
|
|
151
|
+
async crc32Async(input) {
|
|
152
|
+
if (Buffer.isBuffer(input)) {
|
|
153
|
+
return Promise.resolve(this.crc32(input));
|
|
154
|
+
}
|
|
155
|
+
return new Promise((resolve, reject) => {
|
|
156
|
+
const chunks = [];
|
|
157
|
+
input.on('data', (chunk) => {
|
|
158
|
+
const tempBuf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
159
|
+
chunks.push(tempBuf);
|
|
160
|
+
});
|
|
161
|
+
input.on('end', () => {
|
|
162
|
+
const fullBuffer = Buffer.concat(chunks);
|
|
163
|
+
resolve(this.crc32(fullBuffer));
|
|
164
|
+
});
|
|
165
|
+
input.on('error', (error) => {
|
|
166
|
+
reject(error);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Verify a CRC32 checksum on the data
|
|
172
|
+
* @param data - The data to verify
|
|
173
|
+
* @param expectedCrc - The expected CRC32 checksum
|
|
174
|
+
* @returns True if the checksum matches, false otherwise
|
|
175
|
+
*/
|
|
176
|
+
verifyCrc32(data, expectedCrc) {
|
|
177
|
+
const crc32value = (0, crc_1.crc32)(data);
|
|
178
|
+
if (typeof expectedCrc === 'number') {
|
|
179
|
+
return crc32value === (expectedCrc >>> 0);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const expectedCrc32 = expectedCrc.readUInt32BE();
|
|
183
|
+
return crc32value === expectedCrc32;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Validates a CRC32 against a buffer or readable stream
|
|
188
|
+
* @param data The data to validate
|
|
189
|
+
* @param expectedCrc32 The CRC32 to validate against
|
|
190
|
+
* @returns True if the CRC32 is valid, false otherwise
|
|
191
|
+
*/
|
|
192
|
+
async verifyCrc32Async(data, expectedCrc32) {
|
|
193
|
+
const calculatedCrc32 = await this.crc32Async(data);
|
|
194
|
+
return calculatedCrc32.equals(expectedCrc32);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.CrcService = CrcService;
|
|
198
|
+
//# sourceMappingURL=crc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crc.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/services/crc.ts"],"names":[],"mappings":";;;AAEA,6BAA8C;AAE9C,MAAa,UAAU;IACrB;;;;OAIG;IACI,IAAI,CAAC,IAAY;QACtB,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,IAAA,UAAI,EAAC,IAAI,CAAC,CAAC;QAC7B,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC9B,OAAO,OAAO,CAAC;I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