altcha 3.0.0 → 3.0.2

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.
@@ -6042,7 +6042,7 @@ function Widget($$anchor, $$props) {
6042
6042
  }
6043
6043
  });
6044
6044
  onMount(() => {
6045
- log("mounted", "3.0.0");
6045
+ log("mounted", "3.0.2");
6046
6046
  if (instance) {
6047
6047
  globalThis.$altcha.instances.add(instance);
6048
6048
  }
@@ -7125,10 +7125,11 @@ const jsContent$1 = `(function() {
7125
7125
  const password = new PasswordBuffer(nonceBuf, counterMode);
7126
7126
  const start = performance.now();
7127
7127
  let counter = counterStart;
7128
+ let iterations = 0;
7128
7129
  let derivedKeyHex = "";
7129
7130
  let lastYield = start;
7130
7131
  while (true) {
7131
- if (controller?.signal.aborted || timeout && counter % 10 === 0 && performance.now() - start > timeout) {
7132
+ if (controller?.signal.aborted || timeout && iterations % 10 === 0 && performance.now() - start > timeout) {
7132
7133
  return null;
7133
7134
  }
7134
7135
  const { derivedKey } = await deriveKey2(
@@ -7136,7 +7137,7 @@ const jsContent$1 = `(function() {
7136
7137
  saltBuf,
7137
7138
  password.setCounter(counter)
7138
7139
  );
7139
- if (counter % 10 === 0 && performance.now() - lastYield > 200) {
7140
+ if (iterations % 10 === 0 && performance.now() - lastYield > 200) {
7140
7141
  await delay(0);
7141
7142
  lastYield = performance.now();
7142
7143
  }
@@ -7145,6 +7146,7 @@ const jsContent$1 = `(function() {
7145
7146
  break;
7146
7147
  }
7147
7148
  counter = counter + counterStep;
7149
+ iterations = iterations + 1;
7148
7150
  }
7149
7151
  return {
7150
7152
  counter,
@@ -7325,10 +7327,11 @@ const jsContent = `(function() {
7325
7327
  const password = new PasswordBuffer(nonceBuf, counterMode);
7326
7328
  const start = performance.now();
7327
7329
  let counter = counterStart;
7330
+ let iterations = 0;
7328
7331
  let derivedKeyHex = "";
7329
7332
  let lastYield = start;
7330
7333
  while (true) {
7331
- if (controller?.signal.aborted || timeout && counter % 10 === 0 && performance.now() - start > timeout) {
7334
+ if (controller?.signal.aborted || timeout && iterations % 10 === 0 && performance.now() - start > timeout) {
7332
7335
  return null;
7333
7336
  }
7334
7337
  const { derivedKey } = await deriveKey2(
@@ -7336,7 +7339,7 @@ const jsContent = `(function() {
7336
7339
  saltBuf,
7337
7340
  password.setCounter(counter)
7338
7341
  );
7339
- if (counter % 10 === 0 && performance.now() - lastYield > 200) {
7342
+ if (iterations % 10 === 0 && performance.now() - lastYield > 200) {
7340
7343
  await delay(0);
7341
7344
  lastYield = performance.now();
7342
7345
  }
@@ -7345,6 +7348,7 @@ const jsContent = `(function() {
7345
7348
  break;
7346
7349
  }
7347
7350
  counter = counter + counterStep;
7351
+ iterations = iterations + 1;
7348
7352
  }
7349
7353
  return {
7350
7354
  counter,