diff options
Diffstat (limited to 'src/org/traccar/model/User.java')
-rw-r--r-- | src/org/traccar/model/User.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java index 2df5f276d..410bc4d74 100644 --- a/src/org/traccar/model/User.java +++ b/src/org/traccar/model/User.java @@ -15,6 +15,8 @@ */ package org.traccar.model; +import org.traccar.helper.Hashing; + public class User implements Factory { @Override @@ -34,9 +36,9 @@ public class User implements Factory { public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } - private String password; - public String getPassword() { return password; } - public void setPassword(String password) { this.password = password; } + private byte[] password; + public byte[] getPassword() { return password; } + public void setPassword(String password) { this.password = Hashing.sha256(password); } private boolean readonly; @@ -57,5 +59,4 @@ public class User implements Factory { private double longitude; private int zoom; - } |