aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorDemian <demianalonso@gmail.com>2015-06-09 19:51:50 -0300
committerDemian <demianalonso@gmail.com>2015-06-09 19:51:50 -0300
commit96a2d024658746f50628727f7255c4e19ecdb1b4 (patch)
treefc9642ed3159dd16ebd1c5448233b251b091921c /src/org/traccar/database
parent62048ed5ec8054c9e0205f3308d0954926746866 (diff)
downloadtrackermap-server-96a2d024658746f50628727f7255c4e19ecdb1b4.tar.gz
trackermap-server-96a2d024658746f50628727f7255c4e19ecdb1b4.tar.bz2
trackermap-server-96a2d024658746f50628727f7255c4e19ecdb1b4.zip
Moved hashing function to a separate helper class
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/DataManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index fdab359f4..9633ada58 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -38,6 +38,7 @@ import javax.sql.DataSource;
import org.traccar.Context;
import org.traccar.helper.DriverDelegate;
+import org.traccar.helper.Hashing;
import org.traccar.helper.Log;
import org.traccar.http.JsonConverter;
import org.traccar.model.Device;
@@ -219,7 +220,7 @@ public class DataManager {
public User login(String email, String password) throws SQLException {
return QueryBuilder.create(dataSource, properties.getProperty("database.loginUser"))
.setString("email", email)
- .setBytes("password", User.sha256(password))
+ .setBytes("password", Hashing.sha256(password))
.executeQuerySingle(new User());
}