@loaders.gl/crypto 4.0.0-alpha.4 → 4.0.0-alpha.6

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.
Files changed (147) hide show
  1. package/dist/bundle.d.ts +2 -0
  2. package/dist/bundle.d.ts.map +1 -0
  3. package/dist/bundle.js +2 -2
  4. package/dist/crypto-worker.js +2 -0
  5. package/dist/crypto-worker.js.map +7 -0
  6. package/dist/dist.min.js +2 -2
  7. package/dist/dist.min.js.map +7 -1
  8. package/dist/es5/bundle.js +6 -0
  9. package/dist/es5/bundle.js.map +1 -0
  10. package/dist/es5/index.js +83 -0
  11. package/dist/es5/index.js.map +1 -0
  12. package/dist/es5/lib/algorithms/crc32.js +41 -0
  13. package/dist/es5/lib/algorithms/crc32.js.map +1 -0
  14. package/dist/es5/lib/algorithms/crc32c.js +44 -0
  15. package/dist/es5/lib/algorithms/crc32c.js.map +1 -0
  16. package/dist/es5/lib/algorithms/md5-wasm.js +436 -0
  17. package/dist/es5/lib/algorithms/md5-wasm.js.map +1 -0
  18. package/dist/es5/lib/crc32-hash.js +150 -0
  19. package/dist/es5/lib/crc32-hash.js.map +1 -0
  20. package/dist/es5/lib/crc32c-hash.js +149 -0
  21. package/dist/es5/lib/crc32c-hash.js.map +1 -0
  22. package/dist/es5/lib/crypto-hash.js +186 -0
  23. package/dist/es5/lib/crypto-hash.js.map +1 -0
  24. package/dist/es5/lib/hash.js +149 -0
  25. package/dist/es5/lib/hash.js.map +1 -0
  26. package/dist/es5/lib/md5-hash.js +66 -0
  27. package/dist/es5/lib/md5-hash.js.map +1 -0
  28. package/dist/es5/lib/node-hash.js +147 -0
  29. package/dist/es5/lib/node-hash.js.map +1 -0
  30. package/dist/es5/lib/sha256-hash.js +33 -0
  31. package/dist/es5/lib/sha256-hash.js.map +1 -0
  32. package/dist/es5/lib/utils/base64-utils.js +55 -0
  33. package/dist/es5/lib/utils/base64-utils.js.map +1 -0
  34. package/dist/es5/lib/utils/digest-utils.js +23 -0
  35. package/dist/es5/lib/utils/digest-utils.js.map +1 -0
  36. package/dist/es5/types.js +2 -0
  37. package/dist/es5/types.js.map +1 -0
  38. package/dist/es5/workers/worker.js +65 -0
  39. package/dist/es5/workers/worker.js.map +1 -0
  40. package/dist/esm/bundle.js +4 -0
  41. package/dist/esm/bundle.js.map +1 -0
  42. package/dist/esm/index.js +27 -0
  43. package/dist/esm/index.js.map +1 -0
  44. package/dist/esm/lib/algorithms/crc32.js +24 -0
  45. package/dist/esm/lib/algorithms/crc32.js.map +1 -0
  46. package/dist/esm/lib/algorithms/crc32c.js +27 -0
  47. package/dist/esm/lib/algorithms/crc32c.js.map +1 -0
  48. package/dist/esm/lib/algorithms/md5-wasm.js +428 -0
  49. package/dist/esm/lib/algorithms/md5-wasm.js.map +1 -0
  50. package/dist/esm/lib/crc32-hash.js +43 -0
  51. package/dist/esm/lib/crc32-hash.js.map +1 -0
  52. package/dist/esm/lib/crc32c-hash.js +42 -0
  53. package/dist/esm/lib/crc32c-hash.js.map +1 -0
  54. package/dist/esm/lib/crypto-hash.js +54 -0
  55. package/dist/esm/lib/crypto-hash.js.map +1 -0
  56. package/dist/esm/lib/hash.js +30 -0
  57. package/dist/esm/lib/hash.js.map +1 -0
  58. package/dist/esm/lib/md5-hash.js +19 -0
  59. package/dist/esm/lib/md5-hash.js.map +1 -0
  60. package/dist/esm/lib/node-hash.js +38 -0
  61. package/dist/esm/lib/node-hash.js.map +1 -0
  62. package/dist/esm/lib/sha256-hash.js +13 -0
  63. package/dist/esm/lib/sha256-hash.js.map +1 -0
  64. package/dist/esm/lib/utils/base64-utils.js +49 -0
  65. package/dist/esm/lib/utils/base64-utils.js.map +1 -0
  66. package/dist/esm/lib/utils/digest-utils.js +14 -0
  67. package/dist/esm/lib/utils/digest-utils.js.map +1 -0
  68. package/dist/esm/types.js +2 -0
  69. package/dist/esm/types.js.map +1 -0
  70. package/dist/esm/workers/cryptojs-worker.ts.disabled +26 -0
  71. package/dist/esm/workers/worker.js +22 -0
  72. package/dist/esm/workers/worker.js.map +1 -0
  73. package/dist/index.d.ts +33 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +45 -25
  76. package/dist/lib/algorithms/crc32.d.ts +10 -0
  77. package/dist/lib/algorithms/crc32.d.ts.map +1 -0
  78. package/dist/lib/algorithms/crc32.js +25 -23
  79. package/dist/lib/algorithms/crc32c.d.ts +11 -0
  80. package/dist/lib/algorithms/crc32c.d.ts.map +1 -0
  81. package/dist/lib/algorithms/crc32c.js +33 -24
  82. package/dist/lib/algorithms/md5-wasm.d.ts +2 -0
  83. package/dist/lib/algorithms/md5-wasm.d.ts.map +1 -0
  84. package/dist/lib/algorithms/md5-wasm.js +414 -449
  85. package/dist/lib/crc32-hash.d.ts +18 -0
  86. package/dist/lib/crc32-hash.d.ts.map +1 -0
  87. package/dist/lib/crc32-hash.js +45 -54
  88. package/dist/lib/crc32c-hash.d.ts +22 -0
  89. package/dist/lib/crc32c-hash.d.ts.map +1 -0
  90. package/dist/lib/crc32c-hash.js +49 -53
  91. package/dist/lib/crypto-hash.d.ts +32 -0
  92. package/dist/lib/crypto-hash.d.ts.map +1 -0
  93. package/dist/lib/crypto-hash.js +55 -70
  94. package/dist/lib/hash.d.ts +22 -0
  95. package/dist/lib/hash.d.ts.map +1 -0
  96. package/dist/lib/hash.js +27 -36
  97. package/dist/lib/md5-hash.d.ts +15 -0
  98. package/dist/lib/md5-hash.d.ts.map +1 -0
  99. package/dist/lib/md5-hash.js +31 -22
  100. package/dist/lib/node-hash.d.ts +28 -0
  101. package/dist/lib/node-hash.d.ts.map +1 -0
  102. package/dist/lib/node-hash.js +39 -49
  103. package/dist/lib/sha256-hash.d.ts +19 -0
  104. package/dist/lib/sha256-hash.d.ts.map +1 -0
  105. package/dist/lib/sha256-hash.js +13 -11
  106. package/dist/lib/utils/base64-utils.d.ts +3 -2
  107. package/dist/lib/utils/base64-utils.d.ts.map +1 -0
  108. package/dist/lib/utils/base64-utils.js +62 -57
  109. package/dist/lib/utils/digest-utils.d.ts +6 -3
  110. package/dist/lib/utils/digest-utils.d.ts.map +1 -0
  111. package/dist/lib/utils/digest-utils.js +25 -12
  112. package/dist/types.d.ts +10 -0
  113. package/dist/types.d.ts.map +1 -0
  114. package/dist/types.js +2 -2
  115. package/dist/workers/worker.d.ts +4 -0
  116. package/dist/workers/worker.d.ts.map +1 -0
  117. package/dist/workers/worker.js +22 -24
  118. package/package.json +10 -10
  119. package/src/lib/algorithms/{crc32.js → crc32.ts} +2 -0
  120. package/src/lib/algorithms/{crc32c.js → crc32c.ts} +3 -0
  121. package/src/lib/hash.ts +1 -1
  122. package/src/lib/md5-hash.ts +1 -0
  123. package/src/lib/utils/{base64-utils.js → base64-utils.ts} +3 -2
  124. package/src/lib/utils/digest-utils.ts +24 -0
  125. package/dist/bundle.js.map +0 -1
  126. package/dist/index.js.map +0 -1
  127. package/dist/lib/algorithms/crc32.js.map +0 -1
  128. package/dist/lib/algorithms/crc32c.js.map +0 -1
  129. package/dist/lib/algorithms/md5-wasm.js.map +0 -1
  130. package/dist/lib/crc32-hash.js.map +0 -1
  131. package/dist/lib/crc32c-hash.js.map +0 -1
  132. package/dist/lib/crypto-hash.js.map +0 -1
  133. package/dist/lib/hash.js.map +0 -1
  134. package/dist/lib/md5-hash.js.map +0 -1
  135. package/dist/lib/node-hash.js.map +0 -1
  136. package/dist/lib/sha256-hash.js.map +0 -1
  137. package/dist/lib/utils/base64-utils.js.map +0 -1
  138. package/dist/lib/utils/digest-utils.js.map +0 -1
  139. package/dist/types.js.map +0 -1
  140. package/dist/worker.js +0 -5072
  141. package/dist/worker.js.map +0 -1
  142. package/dist/workers/worker.js.map +0 -1
  143. package/src/lib/utils/base64-utils.d.ts +0 -5
  144. package/src/lib/utils/digest-utils.d.ts +0 -6
  145. package/src/lib/utils/digest-utils.js +0 -25
  146. package/dist/{workers → es5/workers}/cryptojs-worker.ts.disabled +0 -0
  147. package/src/lib/algorithms/{md5-wasm.js → md5-wasm.ts} +2 -2
@@ -1,52 +1,42 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import { Hash } from './hash';
3
- import { createHash } from 'crypto';
4
- export class NodeHash extends Hash {
5
- constructor(options) {
6
- var _this$options, _this$options$crypto;
7
-
8
- super();
9
-
10
- _defineProperty(this, "name", 'crypto-node');
11
-
12
- _defineProperty(this, "options", void 0);
13
-
14
- _defineProperty(this, "_algorithm", void 0);
15
-
16
- _defineProperty(this, "_hash", void 0);
17
-
18
- this.options = options;
19
-
20
- if (!((_this$options = this.options) !== null && _this$options !== void 0 && (_this$options$crypto = _this$options.crypto) !== null && _this$options$crypto !== void 0 && _this$options$crypto.algorithm)) {
21
- throw new Error(this.name);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeHash = void 0;
4
+ // This dependency is too big, application must provide it
5
+ const hash_1 = require("./hash");
6
+ const crypto_1 = require("crypto"); // Node.js builtin
7
+ /**
8
+ * Calculates Cryptographic Hash using Node.js crypto library
9
+ * @deprecated Warning, experimental class
10
+ */
11
+ class NodeHash extends hash_1.Hash {
12
+ constructor(options) {
13
+ super();
14
+ this.name = 'crypto-node';
15
+ this.options = options;
16
+ if (!this.options?.crypto?.algorithm) {
17
+ throw new Error(this.name);
18
+ }
22
19
  }
23
- }
24
-
25
- async hash(input) {
26
- var _this$options2, _this$options2$crypto, _this$options2$crypto2;
27
-
28
- await this.preload();
29
- const hash = createHash((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : (_this$options2$crypto = _this$options2.crypto) === null || _this$options2$crypto === void 0 ? void 0 : (_this$options2$crypto2 = _this$options2$crypto.algorithm) === null || _this$options2$crypto2 === void 0 ? void 0 : _this$options2$crypto2.toLowerCase());
30
- const inputArray = new Uint8Array(input);
31
- return hash.update(inputArray).digest('base64');
32
- }
33
-
34
- async *hashBatches(asyncIterator) {
35
- var _this$options3, _this$options3$crypto, _this$options3$crypto2, _this$options4, _this$options4$crypto, _this$options4$crypto2;
36
-
37
- await this.preload();
38
- const hash = createHash((_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : (_this$options3$crypto = _this$options3.crypto) === null || _this$options3$crypto === void 0 ? void 0 : (_this$options3$crypto2 = _this$options3$crypto.algorithm) === null || _this$options3$crypto2 === void 0 ? void 0 : _this$options3$crypto2.toLowerCase());
39
-
40
- for await (const chunk of asyncIterator) {
41
- const inputArray = new Uint8Array(chunk);
42
- hash.update(inputArray);
43
- yield chunk;
20
+ /**
21
+ * Atomic hash calculation
22
+ * @returns base64 encoded hash
23
+ */
24
+ async hash(input) {
25
+ await this.preload();
26
+ const hash = (0, crypto_1.createHash)(this.options?.crypto?.algorithm?.toLowerCase());
27
+ const inputArray = new Uint8Array(input);
28
+ return hash.update(inputArray).digest('base64');
29
+ }
30
+ async *hashBatches(asyncIterator) {
31
+ await this.preload();
32
+ const hash = (0, crypto_1.createHash)(this.options?.crypto?.algorithm?.toLowerCase());
33
+ for await (const chunk of asyncIterator) {
34
+ // https://stackoverflow.com/questions/25567468/how-to-decrypt-an-arraybuffer
35
+ const inputArray = new Uint8Array(chunk);
36
+ hash.update(inputArray);
37
+ yield chunk;
38
+ }
39
+ this.options?.crypto?.onEnd?.({ hash: hash.digest('base64') });
44
40
  }
45
-
46
- (_this$options4 = this.options) === null || _this$options4 === void 0 ? void 0 : (_this$options4$crypto = _this$options4.crypto) === null || _this$options4$crypto === void 0 ? void 0 : (_this$options4$crypto2 = _this$options4$crypto.onEnd) === null || _this$options4$crypto2 === void 0 ? void 0 : _this$options4$crypto2.call(_this$options4$crypto, {
47
- hash: hash.digest('base64')
48
- });
49
- }
50
-
51
41
  }
52
- //# sourceMappingURL=node-hash.js.map
42
+ exports.NodeHash = NodeHash;
@@ -0,0 +1,19 @@
1
+ import { CryptoHash } from './crypto-hash';
2
+ type CryptoHashOptions = {
3
+ modules: {
4
+ [moduleName: string]: any;
5
+ };
6
+ crypto?: {
7
+ onEnd?: (result: {
8
+ hash: string;
9
+ }) => any;
10
+ };
11
+ };
12
+ /**
13
+ * A transform that calculates Cryptographic Hash
14
+ */
15
+ export declare class SHA256Hash extends CryptoHash {
16
+ constructor(options: CryptoHashOptions);
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=sha256-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sha256-hash.d.ts","sourceRoot":"","sources":["../../src/lib/sha256-hash.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE;QAAC,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAC;IACrC,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,KAAK,GAAG,CAAC;KACzC,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,UAAU;gBAC5B,OAAO,EAAE,iBAAiB;CAGvC"}
@@ -1,12 +1,14 @@
1
- import { CryptoHash } from './crypto-hash';
2
- export class SHA256Hash extends CryptoHash {
3
- constructor(options) {
4
- super({ ...options,
5
- crypto: { ...options.crypto,
6
- algorithm: 'SHA256'
7
- }
8
- });
9
- }
10
-
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SHA256Hash = void 0;
4
+ //
5
+ const crypto_hash_1 = require("./crypto-hash");
6
+ /**
7
+ * A transform that calculates Cryptographic Hash
8
+ */
9
+ class SHA256Hash extends crypto_hash_1.CryptoHash {
10
+ constructor(options) {
11
+ super({ ...options, crypto: { ...options.crypto, algorithm: 'SHA256' } });
12
+ }
11
13
  }
12
- //# sourceMappingURL=sha256-hash.js.map
14
+ exports.SHA256Hash = SHA256Hash;
@@ -1,5 +1,6 @@
1
1
  /**
2
- * btoa() polyfill as defined by the HTML and Infra specs, which mostly just references
2
+ * `btoa()` polyfill as defined by the HTML and Infra specs, which mostly just references
3
3
  * RFC 4648.
4
4
  */
5
- export function toBase64(string: string): string;
5
+ export declare function toBase64(string: string): string | null;
6
+ //# sourceMappingURL=base64-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/base64-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkCtD"}
@@ -1,62 +1,67 @@
1
- export function toBase64(string) {
2
- string = "".concat(string);
3
-
4
- for (let i = 0; i < string.length; i++) {
5
- if (string.charCodeAt(i) > 255) {
6
- return null;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toBase64 = void 0;
4
+ /**
5
+ * `btoa()` polyfill as defined by the HTML and Infra specs, which mostly just references
6
+ * RFC 4648.
7
+ */
8
+ function toBase64(string) {
9
+ // String conversion as required by Web IDL.
10
+ string = `${string}`;
11
+ // "The btoa() method must throw an "InvalidCharacterError" DOMException if
12
+ // data contains any character whose code point is greater than U+00FF."
13
+ for (let i = 0; i < string.length; i++) {
14
+ if (string.charCodeAt(i) > 255) {
15
+ return null;
16
+ }
7
17
  }
8
- }
9
-
10
- let out = '';
11
-
12
- for (let i = 0; i < string.length; i += 3) {
13
- const groupsOfSix = [undefined, undefined, undefined, undefined];
14
- groupsOfSix[0] = string.charCodeAt(i) >> 2;
15
- groupsOfSix[1] = (string.charCodeAt(i) & 0x03) << 4;
16
-
17
- if (string.length > i + 1) {
18
- groupsOfSix[1] |= string.charCodeAt(i + 1) >> 4;
19
- groupsOfSix[2] = (string.charCodeAt(i + 1) & 0x0f) << 2;
18
+ let out = '';
19
+ for (let i = 0; i < string.length; i += 3) {
20
+ /** @type {Array[4]} */
21
+ const groupsOfSix = [undefined, undefined, undefined, undefined];
22
+ groupsOfSix[0] = string.charCodeAt(i) >> 2;
23
+ groupsOfSix[1] = (string.charCodeAt(i) & 0x03) << 4;
24
+ if (string.length > i + 1) {
25
+ groupsOfSix[1] |= string.charCodeAt(i + 1) >> 4;
26
+ groupsOfSix[2] = (string.charCodeAt(i + 1) & 0x0f) << 2;
27
+ }
28
+ if (string.length > i + 2) {
29
+ // @ts-expect-error
30
+ groupsOfSix[2] |= string.charCodeAt(i + 2) >> 6;
31
+ groupsOfSix[3] = string.charCodeAt(i + 2) & 0x3f;
32
+ }
33
+ for (let j = 0; j < groupsOfSix.length; j++) {
34
+ if (typeof groupsOfSix[j] === 'undefined') {
35
+ out += '=';
36
+ }
37
+ else {
38
+ out += btoaLookup(groupsOfSix[j]);
39
+ }
40
+ }
20
41
  }
21
-
22
- if (string.length > i + 2) {
23
- groupsOfSix[2] |= string.charCodeAt(i + 2) >> 6;
24
- groupsOfSix[3] = string.charCodeAt(i + 2) & 0x3f;
25
- }
26
-
27
- for (let j = 0; j < groupsOfSix.length; j++) {
28
- if (typeof groupsOfSix[j] === 'undefined') {
29
- out += '=';
30
- } else {
31
- out += btoaLookup(groupsOfSix[j]);
32
- }
33
- }
34
- }
35
-
36
- return out;
42
+ return out;
37
43
  }
38
-
44
+ exports.toBase64 = toBase64;
45
+ /**
46
+ * Lookup table for btoa(), which converts a six-bit number into the
47
+ * corresponding ASCII character.
48
+ */
39
49
  function btoaLookup(idx) {
40
- if (idx < 26) {
41
- return String.fromCharCode(idx + 'A'.charCodeAt(0));
42
- }
43
-
44
- if (idx < 52) {
45
- return String.fromCharCode(idx - 26 + 'a'.charCodeAt(0));
46
- }
47
-
48
- if (idx < 62) {
49
- return String.fromCharCode(idx - 52 + '0'.charCodeAt(0));
50
- }
51
-
52
- if (idx === 62) {
53
- return '+';
54
- }
55
-
56
- if (idx === 63) {
57
- return '/';
58
- }
59
-
60
- return undefined;
50
+ if (idx < 26) {
51
+ return String.fromCharCode(idx + 'A'.charCodeAt(0));
52
+ }
53
+ if (idx < 52) {
54
+ return String.fromCharCode(idx - 26 + 'a'.charCodeAt(0));
55
+ }
56
+ if (idx < 62) {
57
+ return String.fromCharCode(idx - 52 + '0'.charCodeAt(0));
58
+ }
59
+ if (idx === 62) {
60
+ return '+';
61
+ }
62
+ if (idx === 63) {
63
+ return '/';
64
+ }
65
+ // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the teststring.
66
+ return undefined;
61
67
  }
62
- //# sourceMappingURL=base64-utils.js.map
@@ -1,6 +1,9 @@
1
- export function toHex(cipher: number): string;
2
-
1
+ /**
2
+ *
3
+ */
4
+ export declare function toHex(cipher: number): string;
3
5
  /**
4
6
  * @see https://stackoverflow.com/questions/23190056/hex-to-base64-converter-for-javascript
5
7
  */
6
- export function hexToBase64(hexstring: string): string;
8
+ export declare function hexToBase64(hexstring: string): string;
9
+ //# sourceMappingURL=digest-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/digest-utils.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG5C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAUrD"}
@@ -1,14 +1,27 @@
1
- import { toBase64 } from './base64-utils';
2
- export function toHex(cipher) {
3
- const hexString = cipher.toString(16);
4
- return hexString === '0' ? "0".concat(hexString) : hexString;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hexToBase64 = exports.toHex = void 0;
4
+ const base64_utils_1 = require("./base64-utils");
5
+ /**
6
+ *
7
+ */
8
+ function toHex(cipher) {
9
+ const hexString = cipher.toString(16);
10
+ return hexString === '0' ? `0${hexString}` : hexString;
5
11
  }
6
- export function hexToBase64(hexstring) {
7
- if (hexstring.length % 2 !== 0) {
8
- hexstring = "0".concat(hexstring);
9
- }
10
-
11
- const string = hexstring.match(/\w{2}/g).map(a => String.fromCharCode(parseInt(a, 16))).join('');
12
- return toBase64(string);
12
+ exports.toHex = toHex;
13
+ /**
14
+ * @see https://stackoverflow.com/questions/23190056/hex-to-base64-converter-for-javascript
15
+ */
16
+ function hexToBase64(hexstring) {
17
+ // Add leading zero to keep even count of digits
18
+ // eg. f85d741 => 0f85d741
19
+ if (hexstring.length % 2 !== 0) {
20
+ hexstring = `0${hexstring}`;
21
+ }
22
+ const matches = hexstring.match(/\w{2}/g) || [];
23
+ const string = matches.map((a) => String.fromCharCode(parseInt(a, 16))).join('');
24
+ // TODO - define how to handle failures
25
+ return (0, base64_utils_1.toBase64)(string) || '';
13
26
  }
14
- //# sourceMappingURL=digest-utils.js.map
27
+ exports.hexToBase64 = hexToBase64;
@@ -0,0 +1,10 @@
1
+ export type CryptoHashOptions = {
2
+ modules?: {
3
+ [moduleName: string]: any;
4
+ };
5
+ crypto?: {
6
+ algorithm: any;
7
+ onEnd?: any;
8
+ };
9
+ };
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE;QAAC,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAC;IACtC,MAAM,CAAC,EAAE;QACP,SAAS,MAAC;QACV,KAAK,CAAC,MAAC;KACR,CAAC;CACH,CAAC"}
package/dist/types.js CHANGED
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { CRC32Hash } from '../lib/crc32-hash';
2
+ import { CRC32CHash } from '../lib/crc32c-hash';
3
+ export { CRC32Hash, CRC32CHash };
4
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/workers/worker.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAI9C,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,CAAC"}
@@ -1,25 +1,23 @@
1
- import { createWorker } from '@loaders.gl/worker-utils';
2
- import { CRC32Hash } from '../lib/crc32-hash';
3
- import { CRC32CHash } from '../lib/crc32c-hash';
4
- import { MD5Hash } from '../lib/md5-hash';
5
- export { CRC32Hash, CRC32CHash };
6
- createWorker(async (data, options = {}) => {
7
- const {
8
- operation
9
- } = options;
10
-
11
- switch (operation) {
12
- case 'crc32':
13
- return await new CRC32Hash(options).hash(data);
14
-
15
- case 'crc32c':
16
- return await new CRC32CHash(options).hash(data);
17
-
18
- case 'md5':
19
- return await new MD5Hash(options).hash(data);
20
-
21
- default:
22
- throw new Error("invalid option: ".concat(operation));
23
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CRC32CHash = exports.CRC32Hash = void 0;
4
+ const worker_utils_1 = require("@loaders.gl/worker-utils");
5
+ const crc32_hash_1 = require("../lib/crc32-hash");
6
+ Object.defineProperty(exports, "CRC32Hash", { enumerable: true, get: function () { return crc32_hash_1.CRC32Hash; } });
7
+ const crc32c_hash_1 = require("../lib/crc32c-hash");
8
+ Object.defineProperty(exports, "CRC32CHash", { enumerable: true, get: function () { return crc32c_hash_1.CRC32CHash; } });
9
+ const md5_hash_1 = require("../lib/md5-hash");
10
+ (0, worker_utils_1.createWorker)(async (data, options = {}) => {
11
+ // @ts-ignore
12
+ const { operation } = options;
13
+ switch (operation) {
14
+ case 'crc32':
15
+ return await new crc32_hash_1.CRC32Hash(options).hash(data);
16
+ case 'crc32c':
17
+ return await new crc32c_hash_1.CRC32CHash(options).hash(data);
18
+ case 'md5':
19
+ return await new md5_hash_1.MD5Hash(options).hash(data);
20
+ default:
21
+ throw new Error(`invalid option: ${operation}`);
22
+ }
24
23
  });
25
- //# sourceMappingURL=worker.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/crypto",
3
- "version": "4.0.0-alpha.4",
3
+ "version": "4.0.0-alpha.6",
4
4
  "description": "Cryptographic/hashing plugins for loaders.gl",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -17,9 +17,9 @@
17
17
  "mesh",
18
18
  "point cloud"
19
19
  ],
20
- "types": "src/index.ts",
21
- "main": "dist/index.js",
22
- "module": "dist/index.js",
20
+ "types": "dist/index.d.ts",
21
+ "main": "dist/es5/index.js",
22
+ "module": "dist/esm/index.js",
23
23
  "sideEffects": false,
24
24
  "files": [
25
25
  "src",
@@ -28,14 +28,14 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "pre-build": "npm run build-worker && npm run build-bundle",
31
- "build-bundle": "webpack --display=minimal --config ../../scripts/webpack/bundle.js",
32
- "build-worker": "webpack --entry ./src/workers/worker.ts --output ./dist/worker.js --env.dev --config ../../scripts/webpack/worker.js"
31
+ "build-bundle": "esbuild src/bundle.ts --outfile=dist/dist.min.js --bundle --minify --sourcemap",
32
+ "build-worker": "esbuild src/workers/worker.ts --outfile=dist/crypto-worker.js --target=esnext,node12 --bundle --minify --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.3.1",
36
- "@loaders.gl/loader-utils": "4.0.0-alpha.4",
37
- "@loaders.gl/worker-utils": "4.0.0-alpha.4",
38
- "@types/crypto-js": "^4.0.1"
36
+ "@loaders.gl/loader-utils": "4.0.0-alpha.6",
37
+ "@loaders.gl/worker-utils": "4.0.0-alpha.6",
38
+ "@types/crypto-js": "^4.0.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "crypto-js": "^3.0.0 || ^4.0.0"
@@ -44,5 +44,5 @@
44
44
  "crypto": false,
45
45
  "sse4_crc32": false
46
46
  },
47
- "gitHead": "53026061b3c8871f7e96d3a5826125cc6613bddc"
47
+ "gitHead": "acc1985050dfaa0f1f0c066f8da5bce7454a046c"
48
48
  }
@@ -4,6 +4,8 @@
4
4
  * Calculates the CRC32 checksum of a string.
5
5
  */
6
6
  export default class CRC32 {
7
+ crc: number;
8
+
7
9
  constructor() {
8
10
  this.crc = ~0;
9
11
  }
@@ -8,6 +8,9 @@
8
8
  * Calculates the CRC32C checksum of a string.
9
9
  */
10
10
  export default class CRC32C {
11
+ options;
12
+ crc: number;
13
+
11
14
  constructor(options = {}) {
12
15
  this.options = options;
13
16
  this.crc = ~0;
package/src/lib/hash.ts CHANGED
@@ -33,7 +33,7 @@ export abstract class Hash {
33
33
  }
34
34
  const output = await this.concatenate(arrayBuffers);
35
35
  const hash = await this.hash(output);
36
- this.options?.crypto?.onEnd?.({hash});
36
+ this.options.crypto?.onEnd?.({hash});
37
37
  }
38
38
 
39
39
  // HELPERS
@@ -21,6 +21,7 @@ export class MD5Hash extends Hash {
21
21
  */
22
22
  async hash(input: ArrayBuffer): Promise<string> {
23
23
  const md5Promise = new Promise<string>((resolve, reject) =>
24
+ // @ts-expect-error
24
25
  md5WASM(input).then(resolve).catch(reject)
25
26
  );
26
27
  const hex = await md5Promise;
@@ -2,7 +2,7 @@
2
2
  * `btoa()` polyfill as defined by the HTML and Infra specs, which mostly just references
3
3
  * RFC 4648.
4
4
  */
5
- export function toBase64(string) {
5
+ export function toBase64(string: string): string | null {
6
6
  // String conversion as required by Web IDL.
7
7
  string = `${string}`;
8
8
  // "The btoa() method must throw an "InvalidCharacterError" DOMException if
@@ -15,7 +15,7 @@ export function toBase64(string) {
15
15
  let out = '';
16
16
  for (let i = 0; i < string.length; i += 3) {
17
17
  /** @type {Array[4]} */
18
- const groupsOfSix = [undefined, undefined, undefined, undefined];
18
+ const groupsOfSix: (number | undefined)[] = [undefined, undefined, undefined, undefined];
19
19
  groupsOfSix[0] = string.charCodeAt(i) >> 2;
20
20
  groupsOfSix[1] = (string.charCodeAt(i) & 0x03) << 4;
21
21
  if (string.length > i + 1) {
@@ -23,6 +23,7 @@ export function toBase64(string) {
23
23
  groupsOfSix[2] = (string.charCodeAt(i + 1) & 0x0f) << 2;
24
24
  }
25
25
  if (string.length > i + 2) {
26
+ // @ts-expect-error
26
27
  groupsOfSix[2] |= string.charCodeAt(i + 2) >> 6;
27
28
  groupsOfSix[3] = string.charCodeAt(i + 2) & 0x3f;
28
29
  }
@@ -0,0 +1,24 @@
1
+ import {toBase64} from './base64-utils';
2
+
3
+ /**
4
+ *
5
+ */
6
+ export function toHex(cipher: number): string {
7
+ const hexString = cipher.toString(16);
8
+ return hexString === '0' ? `0${hexString}` : hexString;
9
+ }
10
+
11
+ /**
12
+ * @see https://stackoverflow.com/questions/23190056/hex-to-base64-converter-for-javascript
13
+ */
14
+ export function hexToBase64(hexstring: string): string {
15
+ // Add leading zero to keep even count of digits
16
+ // eg. f85d741 => 0f85d741
17
+ if (hexstring.length % 2 !== 0) {
18
+ hexstring = `0${hexstring}`;
19
+ }
20
+ const matches = hexstring.match(/\w{2}/g) || [];
21
+ const string = matches.map((a) => String.fromCharCode(parseInt(a, 16))).join('');
22
+ // TODO - define how to handle failures
23
+ return toBase64(string) || '';
24
+ }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/bundle.ts"],"names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"mappings":"AACA,MAAMA,aAAa,GAAGC,OAAO,CAAC,SAAD,CAA7B;;AACAC,UAAU,CAACC,OAAX,GAAqBD,UAAU,CAACC,OAAX,IAAsB,EAA3C;AACAC,MAAM,CAACC,OAAP,GAAiBC,MAAM,CAACC,MAAP,CAAcL,UAAU,CAACC,OAAzB,EAAkCH,aAAlC,CAAjB","sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"file":"bundle.js"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["CRC32Hash","CRC32CHash","MD5Hash","SHA256Hash","CryptoHash","NodeHash","hexToBase64","_hexToBase64","toHex","_toHex","VERSION","CryptoWorker","id","name","module","version","options","crypto","CryptoJSWorker","cryptojs"],"mappings":"AAEA,SAAQA,SAAR,QAAwB,kBAAxB;AACA,SAAQC,UAAR,QAAyB,mBAAzB;AACA,SAAQC,OAAR,QAAsB,gBAAtB;AACA,SAAQC,UAAR,QAAyB,mBAAzB;AAEA,SAAQC,UAAR,QAAyB,mBAAzB;AACA,SAAQC,QAAR,QAAuB,iBAAvB;AAEA,SAAQC,WAAW,IAAIC,YAAvB,EAAqCC,KAAK,IAAIC,MAA9C,QAA2D,0BAA3D;AAIA,MAAMC,OAAO,GAAG,2BAAuB,WAAvB,qBAAmD,QAAnE;AAKA,OAAO,MAAMC,YAAY,GAAG;AAC1BC,EAAAA,EAAE,EAAE,QADsB;AAE1BC,EAAAA,IAAI,EAAE,8BAFoB;AAG1BC,EAAAA,MAAM,EAAE,QAHkB;AAI1BC,EAAAA,OAAO,EAAEL,OAJiB;AAK1BM,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE;AADD;AALiB,CAArB;AAcP,OAAO,MAAMC,cAAc,GAAG;AAC5BN,EAAAA,EAAE,EAAE,UADwB;AAE5BC,EAAAA,IAAI,EAAE,sBAFsB;AAG5BC,EAAAA,MAAM,EAAE,QAHoB;AAI5BC,EAAAA,OAAO,EAAEL,OAJmB;AAK5BM,EAAAA,OAAO,EAAE;AACPG,IAAAA,QAAQ,EAAE;AADH;AALmB,CAAvB","sourcesContent":["// import type {WorkerObject} from '@loaders.gl/worker-utils';\n\nexport {CRC32Hash} from './lib/crc32-hash';\nexport {CRC32CHash} from './lib/crc32c-hash';\nexport {MD5Hash} from './lib/md5-hash';\nexport {SHA256Hash} from './lib/sha256-hash';\n\nexport {CryptoHash} from './lib/crypto-hash';\nexport {NodeHash} from './lib/node-hash';\n\nexport {hexToBase64 as _hexToBase64, toHex as _toHex} from './lib/utils/digest-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Small, fast worker for CRC32, CRC32c and MD5 Hashes\n */\nexport const CryptoWorker = {\n id: 'crypto',\n name: 'CRC32, CRC32c and MD5 Hashes',\n module: 'crypto',\n version: VERSION,\n options: {\n crypto: {}\n }\n};\n\n/**\n * Large worker for full complement of Cryptographic Hashes\n * bundles the full crypto.js library\n */\nexport const CryptoJSWorker = {\n id: 'cryptojs',\n name: 'Cryptographic Hashes',\n module: 'crypto',\n version: VERSION,\n options: {\n cryptojs: {}\n }\n};\n"],"file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/algorithms/crc32.js"],"names":["CRC32","constructor","crc","update","arrayBuffer","CRC32_TABLE","getCRC32Table","byteArray","Uint8Array","i","byteLength","finalize","Math","abs","CRC32TAB","Uint32Array","of"],"mappings":"AAKA,eAAe,MAAMA,KAAN,CAAY;AACzBC,EAAAA,WAAW,GAAG;AACZ,SAAKC,GAAL,GAAW,CAAC,CAAZ;AACD;;AAEDC,EAAAA,MAAM,CAACC,WAAD,EAAc;AAClB,UAAMC,WAAW,GAAGC,aAAa,EAAjC;AACA,UAAMC,SAAS,GAAG,IAAIC,UAAJ,CAAeJ,WAAf,CAAlB;;AACA,SAAK,IAAIK,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,SAAS,CAACG,UAA9B,EAA0CD,CAAC,EAA3C,EAA+C;AAC7C,WAAKP,GAAL,GAAY,KAAKA,GAAL,KAAa,CAAd,GAAmBG,WAAW,CAAC,CAAC,KAAKH,GAAL,GAAWK,SAAS,CAACE,CAAD,CAArB,IAA4B,IAA7B,CAAzC;AAED;;AACD,WAAO,IAAP;AACD;;AAEDE,EAAAA,QAAQ,GAAG;AACT,SAAKT,GAAL,GAAWU,IAAI,CAACC,GAAL,CAAS,K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AsPf,UAtPe,EAuPf,UAvPe,EAwPf,UAxPe,EAyPf,UAzPe,EA0Pf,UA1Pe,EA2Pf,UA3Pe,EA4Pf,UA5Pe,EA6Pf,UA7Pe,EA8Pf,UA9Pe,EA+Pf,UA/Pe,EAgQf,UAhQe,CAAjB;;AAmQA,SAASV,aAAT,GAAyB;AACvB,SAAOQ,QAAP;AACD","sourcesContent":["// Inspired by https://gist.github.com/wqli78/1330293/6d85cc967f32cccfcbad94ae7d088a3dcfc14bd9\n\n/**\n * Calculates the CRC32 checksum of a string.\n */\nexport default class CRC32 {\n constructor() {\n this.crc = ~0;\n }\n\n update(arrayBuffer) {\n const CRC32_TABLE = getCRC32Table();\n const byteArray = new Uint8Array(arrayBuffer);\n for (let i = 0; i < byteArray.byteLength; i++) {\n this.crc = (this.crc >>> 8) ^ CRC32_TABLE[(this.crc ^ byteArray[i]) & 0xff];\n // strings: crc = (crc >>> 8) ^ CRC32TAB[(crc ^ str.charCodeAt(i)) & 0xff];\n }\n return this;\n }\n\n finalize() {\n this.crc = Math.abs(this.crc ^ -1);\n return this.crc;\n }\n}\n\n// Note: Using a typed array here doubles the speed of the cipher\nconst CRC32TAB = Uint32Array.of(\n 0x00000000,\n 0x77073096,\n 0xee0e612c,\n 0x990951ba,\n 0x076dc419,\n 0x706af48f,\n 0xe963a535,\n 0x9e6495a3,\n 0x0edb8832,\n 0x79dcb8a4,\n 0xe0d5e91e,\n 0x97d2d988,\n 0x09b64c2b,\n 0x7eb17cbd,\n 0xe7b82d07,\n 0x90bf1d91,\n 0x1db71064,\n 0x6ab020f2,\n 0xf3b97148,\n 0x84be41de,\n 0x1adad47d,\n 0x6ddde4eb,\n 0xf4d4b551,\n 0x83d385c7,\n 0x136c9856,\n 0x646ba8c0,\n 0xfd62f97a,\n 0x8a65c9ec,\n 0x14015c4f,\n 0x63066cd9,\n 0xfa0f3d63,\n 0x8d080df5,\n 0x3b6e20c8,\n 0x4c69105e,\n 0xd56041e4,\n 0xa2677172,\n 0x3c03e4d1,\n 0x4b04d447,\n 0xd20d85fd,\n 0xa50ab56b,\n 0x35b5a8fa,\n 0x42b2986c,\n 0xdbbbc9d6,\n 0xacbcf940,\n 0x32d86ce3,\n 0x45df5c75,\n 0xdcd60dcf,\n 0xabd13d59,\n 0x26d930ac,\n 0x51de003a,\n 0xc8d75180,\n 0xbfd06116,\n 0x21b4f4b5,\n 0x56b3c423,\n 0xcfba9599,\n 0xb8bda50f,\n 0x2802b89e,\n 0x5f058808,\n 0xc60cd9b2,\n 0xb10be924,\n 0x2f6f7c87,\n 0x58684c11,\n 0xc1611dab,\n 0xb6662d3d,\n 0x76dc4190,\n 0x01db7106,\n 0x98d220bc,\n 0xefd5102a,\n 0x71b18589,\n 0x06b6b51f,\n 0x9fbfe4a5,\n 0xe8b8d433,\n 0x7807c9a2,\n 0x0f00f934,\n 0x9609a88e,\n 0xe10e9818,\n 0x7f6a0dbb,\n 0x086d3d2d,\n 0x91646c97,\n 0xe6635c01,\n 0x6b6b51f4,\n 0x1c6c6162,\n 0x856530d8,\n 0xf262004e,\n 0x6c0695ed,\n 0x1b01a57b,\n 0x8208f4c1,\n 0xf50fc457,\n 0x65b0d9c6,\n 0x12b7e950,\n 0x8bbeb8ea,\n 0xfcb9887c,\n 0x62dd1ddf,\n 0x15da2d49,\n 0x8cd37cf3,\n 0xfbd44c65,\n 0x4db26158,\n 0x3ab551ce,\n 0xa3bc0074,\n 0xd4bb30e2,\n 0x4adfa541,\n 0x3dd895d7,\n 0xa4d1c46d,\n 0xd3d6f4fb,\n 0x4369e96a,\n 0x346ed9fc,\n 0xad678846,\n 0xda60b8d0,\n 0x44042d73,\n 0x33031de5,\n 0xaa0a4c5f,\n 0xdd0d7cc9,\n 0x5005713c,\n 0x270241aa,\n 0xbe0b1010,\n 0xc90c2086,\n 0x5768b525,\n 0x206f85b3,\n 0xb966d409,\n 0xce61e49f,\n 0x5edef90e,\n 0x29d9c998,\n 0xb0d09822,\n 0xc7d7a8b4,\n 0x59b33d17,\n 0x2eb40d81,\n 0xb7bd5c3b,\n 0xc0ba6cad,\n 0xedb88320,\n 0x9abfb3b6,\n 0x03b6e20c,\n 0x74b1d29a,\n 0xead54739,\n 0x9dd277af,\n 0x04db2615,\n 0x73dc1683,\n 0xe3630b12,\n 0x94643b84,\n 0x0d6d6a3e,\n 0x7a6a5aa8,\n 0xe40ecf0b,\n 0x9309ff9d,\n 0x0a00ae27,\n 0x7d079eb1,\n 0xf00f9344,\n 0x8708a3d2,\n 0x1e01f268,\n 0x6906c2fe,\n 0xf762575d,\n 0x806567cb,\n 0x196c3671,\n 0x6e6b06e7,\n 0xfed41b76,\n 0x89d32be0,\n 0x10da7a5a,\n 0x67dd4acc,\n 0xf9b9df6f,\n 0x8ebeeff9,\n 0x17b7be43,\n 0x60b08ed5,\n 0xd6d6a3e8,\n 0xa1d1937e,\n 0x38d8c2c4,\n 0x4fdff252,\n 0xd1bb67f1,\n 0xa6bc5767,\n 0x3fb506dd,\n 0x48b2364b,\n 0xd80d2bda,\n 0xaf0a1b4c,\n 0x36034af6,\n 0x41047a60,\n 0xdf60efc3,\n 0xa867df55,\n 0x316e8eef,\n 0x4669be79,\n 0xcb61b38c,\n 0xbc66831a,\n 0x256fd2a0,\n 0x5268e236,\n 0xcc0c7795,\n 0xbb0b4703,\n 0x220216b9,\n 0x5505262f,\n 0xc5ba3bbe,\n 0xb2bd0b28,\n 0x2bb45a92,\n 0x5cb36a04,\n 0xc2d7ffa7,\n 0xb5d0cf31,\n 0x2cd99e8b,\n 0x5bdeae1d,\n 0x9b64c2b0,\n 0xec63f226,\n 0x756aa39c,\n 0x026d930a,\n 0x9c0906a9,\n 0xeb0e363f,\n 0x72076785,\n 0x05005713,\n 0x95bf4a82,\n 0xe2b87a14,\n 0x7bb12bae,\n 0x0cb61b38,\n 0x92d28e9b,\n 0xe5d5be0d,\n 0x7cdcefb7,\n 0x0bdbdf21,\n 0x86d3d2d4,\n 0xf1d4e242,\n 0x68ddb3f8,\n 0x1fda836e,\n 0x81be16cd,\n 0xf6b9265b,\n 0x6fb077e1,\n 0x18b74777,\n 0x88085ae6,\n 0xff0f6a70,\n 0x66063bca,\n 0x11010b5c,\n 0x8f659eff,\n 0xf862ae69,\n 0x616bffd3,\n 0x166ccf45,\n 0xa00ae278,\n 0xd70dd2ee,\n 0x4e048354,\n 0x3903b3c2,\n 0xa7672661,\n 0xd06016f7,\n 0x4969474d,\n 0x3e6e77db,\n 0xaed16a4a,\n 0xd9d65adc,\n 0x40df0b66,\n 0x37d83bf0,\n 0xa9bcae53,\n 0xdebb9ec5,\n 0x47b2cf7f,\n 0x30b5ffe9,\n 0xbdbdf21c,\n 0xcabac28a,\n 0x53b39330,\n 0x24b4a3a6,\n 0xbad03605,\n 0xcdd70693,\n 0x54de5729,\n 0x23d967bf,\n 0xb3667a2e,\n 0xc4614ab8,\n 0x5d681b02,\n 0x2a6f2b94,\n 0xb40bbe37,\n 0xc30c8ea1,\n 0x5a05df1b,\n 0x2d02ef8d\n);\n\nfunction getCRC32Table() {\n return CRC32TAB;\n}\n"],"file":"crc32.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/algorithms/crc32c.js"],"names":["CRC32C","constructor","options","crc","update","arrayBuffer","byteArray","Uint8Array","CRC32_TABLE","getCRC32Table","i","length","finalize","CRC32C_TABLE","Int32Array","of"],"mappings":"AASA,eAAe,MAAMA,MAAN,CAAa;AAC1BC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;AACxB,SAAKA,OAAL,GAAeA,OAAf;AACA,SAAKC,GAAL,GAAW,CAAC,CAAZ;AACD;;AAEDC,EAAAA,MAAM,CAACC,WAAD,EAAc;AAClB,UAAMC,SAAS,GAAG,IAAIC,UAAJ,CAAeF,WAAf,CAAlB;AACA,UAAMG,WAAW,GAAGC,aAAa,EAAjC;;AACA,SAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGJ,SAAS,CAACK,MAA9B,EAAsCD,CAAC,EAAv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B,EA6MnB,UA7MmB,EA8MnB,UA9MmB,EA+MnB,UA/MmB,EAgNnB,UAhNmB,EAiNnB,UAjNmB,EAkNnB,UAlNmB,EAmNnB,UAnNmB,EAoNnB,UApNmB,EAqNnB,UArNmB,EAsNnB,UAtNmB,EAuNnB,UAvNmB,EAwNnB,UAxNmB,EAyNnB,UAzNmB,EA0NnB,UA1NmB,EA2NnB,UA3NmB,EA4NnB,UA5NmB,EA6NnB,UA7NmB,EA8NnB,UA9NmB,EA+NnB,UA/NmB,EAgOnB,UAhOmB,EAiOnB,UAjOmB,EAkOnB,UAlOmB,EAmOnB,UAnOmB,EAoOnB,UApOmB,EAqOnB,UArOmB,EAsOnB,UAtOmB,EAuOnB,UAvOmB,EAwOnB,UAxOmB,EAyOnB,UAzOmB,EA0OnB,UA1OmB,EA2OnB,UA3OmB,EA4OnB,UA5OmB,EA6OnB,UA7OmB,EA8OnB,UA9OmB,EA+OnB,UA/OmB,EAgPnB,UAhPmB,EAiPnB,UAjPmB,EAkPnB,UAlPmB,EAmPnB,UAnPmB,EAoPnB,UApPmB,EAqPnB,UArPmB,EAsPnB,UAtPmB,EAuPnB,UAvPmB,EAwPnB,UAxPmB,EAyPnB,UAzPmB,EA0PnB,UA1PmB,EA2PnB,UA3PmB,EA4PnB,UA5PmB,EA6PnB,UA7PmB,EA8PnB,UA9PmB,EA+PnB,UA/PmB,EAgQnB,UAhQmB,CAArB;;AAmQA,SAASN,aAAT,GAAyB;AACvB,SAAOI,YAAP;AACD","sourcesContent":["// From: https://gist.github.com/wqli78/1330293/6d85cc967f32cccfcbad94ae7d088a3dcfc14bd9\n// CRC32 doesn't appear to be supported natively by crypto-js\n\n// import {toBuffer} from '@loaders.gl/loader-utils';\n// import {calculate as sse4calculate} from 'sse4_crc32';\n\n/**\n * Calculates the CRC32C checksum of a string.\n */\nexport default class CRC32C {\n constructor(options = {}) {\n this.options = options;\n this.crc = ~0;\n }\n\n update(arrayBuffer) {\n const byteArray = new Uint8Array(arrayBuffer);\n const CRC32_TABLE = getCRC32Table();\n for (let i = 0; i < byteArray.length; i++) {\n this.crc = CRC32_TABLE[(this.crc ^ byteArray[i]) & 0xff] ^ (this.crc >>> 8);\n }\n return this;\n }\n\n finalize() {\n this.crc = (this.crc ^ -1) >>> 0;\n return this.crc;\n }\n}\n\n/**\n * This code is a manual javascript translation of c code generated by\n * pycrc 0.7.1 (http://www.tty1.net/pycrc/). Command line used:\n * './pycrc.py --model=crc-32c --generate c --algorithm=table-driven'\n */\n\n// Note: Using a typed array here doubles the speed of the cipher\nconst CRC32C_TABLE = Int32Array.of(\n 0x00000000,\n 0xf26b8303,\n 0xe13b70f7,\n 0x1350f3f4,\n 0xc79a971f,\n 0x35f1141c,\n 0x26a1e7e8,\n 0xd4ca64eb,\n 0x8ad958cf,\n 0x78b2dbcc,\n 0x6be22838,\n 0x9989ab3b,\n 0x4d43cfd0,\n 0xbf284cd3,\n 0xac78bf27,\n 0x5e133c24,\n 0x105ec76f,\n 0xe235446c,\n 0xf165b798,\n 0x030e349b,\n 0xd7c45070,\n 0x25afd373,\n 0x36ff2087,\n 0xc494a384,\n 0x9a879fa0,\n 0x68ec1ca3,\n 0x7bbcef57,\n 0x89d76c54,\n 0x5d1d08bf,\n 0xaf768bbc,\n 0xbc267848,\n 0x4e4dfb4b,\n 0x20bd8ede,\n 0xd2d60ddd,\n 0xc186fe29,\n 0x33ed7d2a,\n 0xe72719c1,\n 0x154c9ac2,\n 0x061c6936,\n 0xf477ea35,\n 0xaa64d611,\n 0x580f5512,\n 0x4b5fa6e6,\n 0xb93425e5,\n 0x6dfe410e,\n 0x9f95c20d,\n 0x8cc531f9,\n 0x7eaeb2fa,\n 0x30e349b1,\n 0xc288cab2,\n 0xd1d83946,\n 0x23b3ba45,\n 0xf779deae,\n 0x05125dad,\n 0x1642ae59,\n 0xe4292d5a,\n 0xba3a117e,\n 0x4851927d,\n 0x5b016189,\n 0xa96ae28a,\n 0x7da08661,\n 0x8fcb0562,\n 0x9c9bf696,\n 0x6ef07595,\n 0x417b1dbc,\n 0xb3109ebf,\n 0xa0406d4b,\n 0x522bee48,\n 0x86e18aa3,\n 0x748a09a0,\n 0x67dafa54,\n 0x95b17957,\n 0xcba24573,\n 0x39c9c670,\n 0x2a993584,\n 0xd8f2b687,\n 0x0c38d26c,\n 0xfe53516f,\n 0xed03a29b,\n 0x1f682198,\n 0x5125dad3,\n 0xa34e59d0,\n 0xb01eaa24,\n 0x42752927,\n 0x96bf4dcc,\n 0x64d4cecf,\n 0x77843d3b,\n 0x85efbe38,\n 0xdbfc821c,\n 0x2997011f,\n 0x3ac7f2eb,\n 0xc8ac71e8,\n 0x1c661503,\n 0xee0d9600,\n 0xfd5d65f4,\n 0x0f36e6f7,\n 0x61c69362,\n 0x93ad1061,\n 0x80fde395,\n 0x72966096,\n 0xa65c047d,\n 0x5437877e,\n 0x4767748a,\n 0xb50cf789,\n 0xeb1fcbad,\n 0x197448ae,\n 0x0a24bb5a,\n 0xf84f3859,\n 0x2c855cb2,\n 0xdeeedfb1,\n 0xcdbe2c45,\n 0x3fd5af46,\n 0x7198540d,\n 0x83f3d70e,\n 0x90a324fa,\n 0x62c8a7f9,\n 0xb602c312,\n 0x44694011,\n 0x5739b3e5,\n 0xa55230e6,\n 0xfb410cc2,\n 0x092a8fc1,\n 0x1a7a7c35,\n 0xe811ff36,\n 0x3cdb9bdd,\n 0xceb018de,\n 0xdde0eb2a,\n 0x2f8b6829,\n 0x82f63b78,\n 0x709db87b,\n 0x63cd4b8f,\n 0x91a6c88c,\n 0x456cac67,\n 0xb7072f64,\n 0xa457dc90,\n 0x563c5f93,\n 0x082f63b7,\n 0xfa44e0b4,\n 0xe9141340,\n 0x1b7f9043,\n 0xcfb5f4a8,\n 0x3dde77ab,\n 0x2e8e845f,\n 0xdce5075c,\n 0x92a8fc17,\n 0x60c37f14,\n 0x73938ce0,\n 0x81f80fe3,\n 0x55326b08,\n 0xa759e80b,\n 0xb4091bff,\n 0x466298fc,\n 0x1871a4d8,\n 0xea1a27db,\n 0xf94ad42f,\n 0x0b21572c,\n 0xdfeb33c7,\n 0x2d80b0c4,\n 0x3ed04330,\n 0xccbbc033,\n 0xa24bb5a6,\n 0x502036a5,\n 0x4370c551,\n 0xb11b4652,\n 0x65d122b9,\n 0x97baa1ba,\n 0x84ea524e,\n 0x7681d14d,\n 0x2892ed69,\n 0xdaf96e6a,\n 0xc9a99d9e,\n 0x3bc21e9d,\n 0xef087a76,\n 0x1d63f975,\n 0x0e330a81,\n 0xfc588982,\n 0xb21572c9,\n 0x407ef1ca,\n 0x532e023e,\n 0xa145813d,\n 0x758fe5d6,\n 0x87e466d5,\n 0x94b49521,\n 0x66df1622,\n 0x38cc2a06,\n 0xcaa7a905,\n 0xd9f75af1,\n 0x2b9cd9f2,\n 0xff56bd19,\n 0x0d3d3e1a,\n 0x1e6dcdee,\n 0xec064eed,\n 0xc38d26c4,\n 0x31e6a5c7,\n 0x22b65633,\n 0xd0ddd530,\n 0x0417b1db,\n 0xf67c32d8,\n 0xe52cc12c,\n 0x1747422f,\n 0x49547e0b,\n 0xbb3ffd08,\n 0xa86f0efc,\n 0x5a048dff,\n 0x8ecee914,\n 0x7ca56a17,\n 0x6ff599e3,\n 0x9d9e1ae0,\n 0xd3d3e1ab,\n 0x21b862a8,\n 0x32e8915c,\n 0xc083125f,\n 0x144976b4,\n 0xe622f5b7,\n 0xf5720643,\n 0x07198540,\n 0x590ab964,\n 0xab613a67,\n 0xb831c993,\n 0x4a5a4a90,\n 0x9e902e7b,\n 0x6cfbad78,\n 0x7fab5e8c,\n 0x8dc0dd8f,\n 0xe330a81a,\n 0x115b2b19,\n 0x020bd8ed,\n 0xf0605bee,\n 0x24aa3f05,\n 0xd6c1bc06,\n 0xc5914ff2,\n 0x37faccf1,\n 0x69e9f0d5,\n 0x9b8273d6,\n 0x88d28022,\n 0x7ab90321,\n 0xae7367ca,\n 0x5c18e4c9,\n 0x4f48173d,\n 0xbd23943e,\n 0xf36e6f75,\n 0x0105ec76,\n 0x12551f82,\n 0xe03e9c81,\n 0x34f4f86a,\n 0xc69f7b69,\n 0xd5cf889d,\n 0x27a40b9e,\n 0x79b737ba,\n 0x8bdcb4b9,\n 0x988c474d,\n 0x6ae7c44e,\n 0xbe2da0a5,\n 0x4c4623a6,\n 0x5f16d052,\n 0xad7d5351\n);\n\nfunction getCRC32Table() {\n return CRC32C_TABLE;\n}\n"],"file":"crc32c.js"}