apeframework 0.0.0-dev.27 → 0.0.0-dev.28

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.
@@ -1,6 +1,6 @@
1
1
  declare enum Algorithm {
2
- ARGON2I = 1,
3
2
  ARGON2D = 0,
3
+ ARGON2I = 1,
4
4
  ARGON2ID = 2
5
5
  }
6
6
  export { Algorithm, };
@@ -1,7 +1,7 @@
1
1
  var Algorithm;
2
2
  (function (Algorithm) {
3
- Algorithm[Algorithm["ARGON2I"] = 1] = "ARGON2I";
4
3
  Algorithm[Algorithm["ARGON2D"] = 0] = "ARGON2D";
4
+ Algorithm[Algorithm["ARGON2I"] = 1] = "ARGON2I";
5
5
  Algorithm[Algorithm["ARGON2ID"] = 2] = "ARGON2ID";
6
6
  })(Algorithm || (Algorithm = {}));
7
7
  export { Algorithm, };
package/dist/pwd/Pwd.js CHANGED
@@ -22,7 +22,7 @@ class Pwd {
22
22
  }
23
23
  async hashPassword(password) {
24
24
  return argon2.hash(password, {
25
- type: this.algorithm,
25
+ ...this.algorithm ? { type: this.algorithm } : {},
26
26
  hashLength: this.hashLength,
27
27
  timeCost: this.timeCost,
28
28
  memoryCost: this.memoryCost,
@@ -1,6 +1,6 @@
1
1
  import { MemoryCostError } from './errors/MemoryCostError.js';
2
2
  const validateMemoryCost = (memoryCost) => {
3
- if (memoryCost && memoryCost < 8) {
3
+ if (memoryCost && memoryCost < 1024) {
4
4
  throw new MemoryCostError(memoryCost);
5
5
  }
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { TimeCostError } from './errors/TimeCostError.js';
2
2
  const validateTimeCost = (timeCost) => {
3
- if (timeCost && timeCost < 1) {
3
+ if (timeCost && timeCost < 2) {
4
4
  throw new TimeCostError(timeCost);
5
5
  }
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apeframework",
3
- "version": "0.0.0-dev.27",
3
+ "version": "0.0.0-dev.28",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },