@h3ravel/hashing 0.1.2 → 0.1.3

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/index.js CHANGED
@@ -102,7 +102,7 @@ var Argon2idHasher = class extends AbstractHasher {
102
102
  constructor(options = {}) {
103
103
  super();
104
104
  this.memory = options.memory ?? this.memory;
105
- this.verifyAlgorithm = options.verify ?? this.verifyAlgorithm;
105
+ this.verifyAlgorithm = options.verify ?? process.env.HASH_VERIFY ?? this.verifyAlgorithm;
106
106
  this.threads = options.threads ?? this.threads;
107
107
  this.time = options.time ?? this.time;
108
108
  }
@@ -210,7 +210,7 @@ var ArgonHasher = class extends AbstractHasher {
210
210
  constructor(options = {}) {
211
211
  super();
212
212
  this.memory = options.memory ?? this.memory;
213
- this.verifyAlgorithm = options.verify ?? this.verifyAlgorithm;
213
+ this.verifyAlgorithm = options.verify ?? process.env.HASH_VERIFY ?? this.verifyAlgorithm;
214
214
  this.threads = options.threads ?? this.threads;
215
215
  this.time = options.time ?? this.time;
216
216
  }
@@ -2210,7 +2210,7 @@ var BcryptHasher = class extends AbstractHasher {
2210
2210
  constructor(options = {}) {
2211
2211
  super();
2212
2212
  this.rounds = options.rounds ?? this.rounds;
2213
- this.verifyAlgorithm = options.verify ?? this.verifyAlgorithm;
2213
+ this.verifyAlgorithm = options.verify ?? process.env.HASH_VERIFY ?? this.verifyAlgorithm;
2214
2214
  this.limit = options.limit ?? this.limit;
2215
2215
  }
2216
2216
  /**
@@ -10604,7 +10604,7 @@ var Manager = class {
10604
10604
  * @return string
10605
10605
  */
10606
10606
  getDefaultDriver() {
10607
- return this.config.driver ?? "bcrypt";
10607
+ return this.config.driver ?? process.env.HASH_DRIVER ?? "bcrypt";
10608
10608
  }
10609
10609
  createDriver(driver) {
10610
10610
  const method = "create" + Str.studly(driver) + "Driver";