From 96a2d024658746f50628727f7255c4e19ecdb1b4 Mon Sep 17 00:00:00 2001 From: Demian Date: Tue, 9 Jun 2015 19:51:50 -0300 Subject: Moved hashing function to a separate helper class --- src/org/traccar/database/DataManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/database') 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()); } -- cgit v1.2.3