quantum-resistant-rustykey 0.13.4 → 0.13.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.
@@ -161,16 +161,7 @@ var SqisignLvl1Module = (() => {
161
161
  abort("no native wasm support detected");
162
162
  }
163
163
  function intArrayFromBase64(s) {
164
- if (typeof ENVIRONMENT_IS_NODE != "undefined" && ENVIRONMENT_IS_NODE) {
165
- var buf = Buffer.from(s, "base64");
166
- return new Uint8Array(buf.buffer, buf.byteOffset, buf.length);
167
- }
168
- var decoded = atob(s);
169
- var bytes = new Uint8Array(decoded.length);
170
- for (var i = 0; i < decoded.length; ++i) {
171
- bytes[i] = decoded.charCodeAt(i);
172
- }
173
- return bytes;
164
+ return Uint8Array.fromBase64(s);
174
165
  }
175
166
  function tryParseAsDataURI(filename) {
176
167
  if (!isDataURI(filename)) {
@@ -626,16 +617,7 @@ var SqisignLvl3Module = (() => {
626
617
  abort("no native wasm support detected");
627
618
  }
628
619
  function intArrayFromBase64(s) {
629
- if (typeof ENVIRONMENT_IS_NODE != "undefined" && ENVIRONMENT_IS_NODE) {
630
- var buf = Buffer.from(s, "base64");
631
- return new Uint8Array(buf.buffer, buf.byteOffset, buf.length);
632
- }
633
- var decoded = atob(s);
634
- var bytes = new Uint8Array(decoded.length);
635
- for (var i = 0; i < decoded.length; ++i) {
636
- bytes[i] = decoded.charCodeAt(i);
637
- }
638
- return bytes;
620
+ return Uint8Array.fromBase64(s);
639
621
  }
640
622
  function tryParseAsDataURI(filename) {
641
623
  if (!isDataURI(filename)) {
@@ -1091,16 +1073,7 @@ var SqisignLvl5Module = (() => {
1091
1073
  abort("no native wasm support detected");
1092
1074
  }
1093
1075
  function intArrayFromBase64(s) {
1094
- if (typeof ENVIRONMENT_IS_NODE != "undefined" && ENVIRONMENT_IS_NODE) {
1095
- var buf = Buffer.from(s, "base64");
1096
- return new Uint8Array(buf.buffer, buf.byteOffset, buf.length);
1097
- }
1098
- var decoded = atob(s);
1099
- var bytes = new Uint8Array(decoded.length);
1100
- for (var i = 0; i < decoded.length; ++i) {
1101
- bytes[i] = decoded.charCodeAt(i);
1102
- }
1103
- return bytes;
1076
+ return Uint8Array.fromBase64(s);
1104
1077
  }
1105
1078
  function tryParseAsDataURI(filename) {
1106
1079
  if (!isDataURI(filename)) {
@@ -1589,9 +1562,18 @@ async function handleOp(request) {
1589
1562
  };
1590
1563
  }
1591
1564
  }
1565
+ var opChain = Promise.resolve();
1566
+ function enqueueOp(request) {
1567
+ const result = opChain.then(() => handleOp(request));
1568
+ opChain = result.then(
1569
+ () => void 0,
1570
+ () => void 0
1571
+ );
1572
+ return result;
1573
+ }
1592
1574
  var workerScope = self;
1593
1575
  workerScope.onmessage = (event) => {
1594
- void handleOp(event.data).then((result) => {
1576
+ void enqueueOp(event.data).then((result) => {
1595
1577
  const transfers = [];
1596
1578
  if (result.ok) {
1597
1579
  if (result.pk) transfers.push(result.pk.buffer);