aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-01 11:47:14 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-01 11:47:14 +1200
commit200ef5bb3fd4f194c47518e0633d7e8bb6ab6d79 (patch)
tree75853ff83b9a97e37d8d940025a2559484be5040 /src/org/traccar/model
parentc099628f0cd07ca6545773a69824b567a6610675 (diff)
downloadtrackermap-server-200ef5bb3fd4f194c47518e0633d7e8bb6ab6d79.tar.gz
trackermap-server-200ef5bb3fd4f194c47518e0633d7e8bb6ab6d79.tar.bz2
trackermap-server-200ef5bb3fd4f194c47518e0633d7e8bb6ab6d79.zip
Re-implement hashing class
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;
}