@loaders.gl/crypto 4.0.0-beta.3 → 4.0.0-beta.4
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/dist.dev.js +1 -26
- package/package.json +4 -4
package/dist/dist.dev.js
CHANGED
|
@@ -84,7 +84,6 @@ var __exports__ = (() => {
|
|
|
84
84
|
hash
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
// HELPERS
|
|
88
87
|
async concatenate(asyncIterator) {
|
|
89
88
|
return await concatenateArrayBuffersAsync(asyncIterator);
|
|
90
89
|
}
|
|
@@ -260,10 +259,6 @@ var __exports__ = (() => {
|
|
|
260
259
|
this._hash = new CRC32();
|
|
261
260
|
this.hashBatches = this.hashBatches.bind(this);
|
|
262
261
|
}
|
|
263
|
-
/**
|
|
264
|
-
* Atomic hash calculation
|
|
265
|
-
* @returns base64 encoded hash
|
|
266
|
-
*/
|
|
267
262
|
async hash(input, encoding) {
|
|
268
263
|
return this.hashSync(input, encoding);
|
|
269
264
|
}
|
|
@@ -312,10 +307,6 @@ var __exports__ = (() => {
|
|
|
312
307
|
// src/lib/crc32c-hash.ts
|
|
313
308
|
var CRC32CHash = class extends Hash {
|
|
314
309
|
name = "crc32c";
|
|
315
|
-
/**
|
|
316
|
-
* Atomic hash calculation
|
|
317
|
-
* @returns base64 encoded hash
|
|
318
|
-
*/
|
|
319
310
|
constructor(options = {}) {
|
|
320
311
|
super();
|
|
321
312
|
this.options = {
|
|
@@ -324,10 +315,6 @@ var __exports__ = (() => {
|
|
|
324
315
|
};
|
|
325
316
|
this._hash = new CRC32C(options);
|
|
326
317
|
}
|
|
327
|
-
/**
|
|
328
|
-
* Atomic hash calculation
|
|
329
|
-
* @returns base64 encoded hash
|
|
330
|
-
*/
|
|
331
318
|
async hash(input, encoding) {
|
|
332
319
|
return this.hashSync(input, encoding);
|
|
333
320
|
}
|
|
@@ -336,7 +323,6 @@ var __exports__ = (() => {
|
|
|
336
323
|
const digest = this._hash.finalize();
|
|
337
324
|
return encodeNumber(digest, encoding);
|
|
338
325
|
}
|
|
339
|
-
// runInBatches inherited
|
|
340
326
|
async *hashBatches(asyncIterator, encoding = "base64") {
|
|
341
327
|
for await (const chunk of asyncIterator) {
|
|
342
328
|
this._hash.update(chunk);
|
|
@@ -766,15 +752,8 @@ var __exports__ = (() => {
|
|
|
766
752
|
super();
|
|
767
753
|
this.options = options;
|
|
768
754
|
}
|
|
769
|
-
/**
|
|
770
|
-
* Atomic hash calculation
|
|
771
|
-
* @returns base64 encoded hash
|
|
772
|
-
*/
|
|
773
755
|
async hash(input, encoding) {
|
|
774
|
-
const md5Promise = new Promise((resolve, reject) => (
|
|
775
|
-
// @ts-expect-error
|
|
776
|
-
md5WASM(input).then(resolve).catch(reject)
|
|
777
|
-
));
|
|
756
|
+
const md5Promise = new Promise((resolve, reject) => md5WASM(input).then(resolve).catch(reject));
|
|
778
757
|
const hex = await md5Promise;
|
|
779
758
|
return encodeHex(hex, encoding);
|
|
780
759
|
}
|
|
@@ -807,10 +786,6 @@ var __exports__ = (() => {
|
|
|
807
786
|
throw new Error(this.name);
|
|
808
787
|
}
|
|
809
788
|
}
|
|
810
|
-
/**
|
|
811
|
-
* Atomic hash calculation
|
|
812
|
-
* @returns base64 encoded hash
|
|
813
|
-
*/
|
|
814
789
|
async hash(input, encoding) {
|
|
815
790
|
await this.preload();
|
|
816
791
|
const typedWordArray = CryptoJS.lib.WordArray.create(input);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/crypto",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.4",
|
|
4
4
|
"description": "Cryptographic/hashing plugins for loaders.gl",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime": "^7.3.1",
|
|
45
|
-
"@loaders.gl/loader-utils": "4.0.0-beta.
|
|
46
|
-
"@loaders.gl/worker-utils": "4.0.0-beta.
|
|
45
|
+
"@loaders.gl/loader-utils": "4.0.0-beta.4",
|
|
46
|
+
"@loaders.gl/worker-utils": "4.0.0-beta.4",
|
|
47
47
|
"@types/crypto-js": "^4.0.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"crypto": false,
|
|
54
54
|
"sse4_crc32": false
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "848c20b474532d301f2c3f8d4e1fb9bf262b86d4"
|
|
57
57
|
}
|