@zaplier/sdk 1.0.6 → 1.0.7

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/sdk.js CHANGED
@@ -157,8 +157,12 @@
157
157
  h1 = x64Add(h1, h2);
158
158
  h2 = x64Add(h2, h1);
159
159
  // Convert to hex string
160
- const hex1 = h1[0].toString(16).padStart(8, "0") + h1[1].toString(16).padStart(8, "0");
161
- const hex2 = h2[0].toString(16).padStart(8, "0") + h2[1].toString(16).padStart(8, "0");
160
+ // CRITICAL: Use >>> 0 to convert to unsigned 32-bit integer before converting to hex
161
+ // This prevents negative numbers from generating hashes with minus signs (e.g., "-6b43973f")
162
+ const hex1 = (h1[0] >>> 0).toString(16).padStart(8, "0") +
163
+ (h1[1] >>> 0).toString(16).padStart(8, "0");
164
+ const hex2 = (h2[0] >>> 0).toString(16).padStart(8, "0") +
165
+ (h2[1] >>> 0).toString(16).padStart(8, "0");
162
166
  return hex1 + hex2;
163
167
  }
164
168
  /**