@sockethub/util 1.0.0-alpha.12 → 1.0.0-alpha.13
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/crypto/index.js +5 -5
- package/dist/crypto/index.js.map +2 -2
- package/dist/error/index.js +1 -37
- package/dist/error/index.js.map +2 -2
- package/dist/index.js +1 -38
- package/dist/index.js.map +2 -2
- package/dist/net/index.js +1 -37
- package/dist/net/index.js.map +2 -2
- package/package.json +2 -2
package/dist/crypto/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -10700,9 +10700,9 @@ class Crypto {
|
|
|
10700
10700
|
const charsLength = chars.length;
|
|
10701
10701
|
const baseInput = secrets.join(":");
|
|
10702
10702
|
for (let counter = 0;counter < 32; counter++) {
|
|
10703
|
-
const
|
|
10704
|
-
|
|
10705
|
-
const bytes =
|
|
10703
|
+
const hash = createHash2("sha256");
|
|
10704
|
+
hash.update(counter === 0 ? baseInput : `${baseInput}:${counter}`);
|
|
10705
|
+
const bytes = hash.digest();
|
|
10706
10706
|
let result = "";
|
|
10707
10707
|
for (let i = 0;i < 32; i++) {
|
|
10708
10708
|
result += chars[bytes[i] % charsLength];
|
|
@@ -10753,4 +10753,4 @@ export {
|
|
|
10753
10753
|
getPlatformId
|
|
10754
10754
|
};
|
|
10755
10755
|
|
|
10756
|
-
//# debugId=
|
|
10756
|
+
//# debugId=F370FF952199237D64756E2164756E21
|