@aws-sdk/crc64-nvme-crt 3.726.0 → 3.729.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.
package/dist-cjs/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(src_exports, {
|
|
|
24
24
|
CrtCrc64Nvme: () => CrtCrc64Nvme
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
var import_middleware_flexible_checksums = require("@aws-sdk/middleware-flexible-checksums");
|
|
27
28
|
|
|
28
29
|
// src/CrtCrc64Nvme.ts
|
|
29
30
|
var import_crt_loader = require("@aws-sdk/crt-loader");
|
|
@@ -32,20 +33,20 @@ var CrtCrc64Nvme = class {
|
|
|
32
33
|
static {
|
|
33
34
|
__name(this, "CrtCrc64Nvme");
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
update(
|
|
37
|
-
this.
|
|
36
|
+
checksum = new DataView(new ArrayBuffer(8));
|
|
37
|
+
update(data) {
|
|
38
|
+
this.checksum = import_crt_loader.checksums.crc64nvme(data, this.checksum);
|
|
38
39
|
}
|
|
39
40
|
async digest() {
|
|
40
|
-
|
|
41
|
-
throw new Error("No data provided to checksum");
|
|
42
|
-
}
|
|
43
|
-
return (0, import_util_utf8.toUint8Array)(this.previous);
|
|
41
|
+
return (0, import_util_utf8.toUint8Array)(this.checksum);
|
|
44
42
|
}
|
|
45
43
|
reset() {
|
|
46
|
-
this.
|
|
44
|
+
this.checksum = new DataView(new ArrayBuffer(8));
|
|
47
45
|
}
|
|
48
46
|
};
|
|
47
|
+
|
|
48
|
+
// src/index.ts
|
|
49
|
+
import_middleware_flexible_checksums.crc64NvmeCrtContainer.CrtCrc64Nvme = CrtCrc64Nvme;
|
|
49
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
51
|
|
|
51
52
|
0 && (module.exports = {
|
package/dist-es/CrtCrc64Nvme.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { checksums } from "@aws-sdk/crt-loader";
|
|
2
2
|
import { toUint8Array } from "@smithy/util-utf8";
|
|
3
3
|
export class CrtCrc64Nvme {
|
|
4
|
-
|
|
5
|
-
update(
|
|
6
|
-
this.
|
|
4
|
+
checksum = new DataView(new ArrayBuffer(8));
|
|
5
|
+
update(data) {
|
|
6
|
+
this.checksum = checksums.crc64nvme(data, this.checksum);
|
|
7
7
|
}
|
|
8
8
|
async digest() {
|
|
9
|
-
|
|
10
|
-
throw new Error("No data provided to checksum");
|
|
11
|
-
}
|
|
12
|
-
return toUint8Array(this.previous);
|
|
9
|
+
return toUint8Array(this.checksum);
|
|
13
10
|
}
|
|
14
11
|
reset() {
|
|
15
|
-
this.
|
|
12
|
+
this.checksum = new DataView(new ArrayBuffer(8));
|
|
16
13
|
}
|
|
17
14
|
}
|
package/dist-es/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/crc64-nvme-crt",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.729.0",
|
|
4
4
|
"description": "An implementation of CRC64-NVME checksum based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@aws-sdk/crt-loader": "3.726.0",
|
|
27
|
+
"@aws-sdk/middleware-flexible-checksums": "3.729.0",
|
|
27
28
|
"@smithy/types": "^4.0.0",
|
|
28
29
|
"@smithy/util-utf8": "^4.0.0",
|
|
29
30
|
"tslib": "^2.6.2"
|