aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/User.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java
index a838ef018..bcb03804c 100644
--- a/src/org/traccar/model/User.java
+++ b/src/org/traccar/model/User.java
@@ -15,9 +15,8 @@
*/
package org.traccar.model;
+import org.traccar.helper.Hashing;
import org.traccar.helper.IgnoreOnSerialization;
-import org.traccar.helper.PasswordHash;
-import org.traccar.helper.PasswordHash.HashingResult;
public class User implements Factory {
@@ -77,11 +76,11 @@ public class User implements Factory {
}
public boolean isPasswordValid(String inputPassword) {
- return PasswordHash.validatePassword(inputPassword.toCharArray(), PasswordHash.PBKDF2_ITERATIONS, this.salt, this.hashedPassword);
+ return Hashing.validatePassword(inputPassword, this.hashedPassword, this.salt);
}
public void hashPassword(String password) {
- HashingResult hashingResult = PasswordHash.createHash(password);
+ Hashing.HashingResult hashingResult = Hashing.createHash(password);
this.hashedPassword = hashingResult.hash;
this.salt = hashingResult.salt;
}