@Override
public User setPassword(String password) {
try {
- getValue("password", String.class).set(Hex.toHex(MessageDigestHasher.getSHA512Hasher().hash(password.getBytes("UTF-8"))));
+ getValue("password", String.class).set(Hex.toHex(MessageDigestHasher.getSHA256Hasher().hash(password.getBytes("UTF-8"))));
return this;
} catch (UnsupportedEncodingException uee1) {
throw new RuntimeException("VM does not support UTF-8.", uee1);
@Override
public boolean verifyPassword(String password) {
try {
- return getValue("password", String.class).get().equalsIgnoreCase(Hex.toHex(MessageDigestHasher.getSHA512Hasher().hash(password.getBytes("UTF-8"))));
+ return getValue("password", String.class).get().equalsIgnoreCase(Hex.toHex(MessageDigestHasher.getSHA256Hasher().hash(password.getBytes("UTF-8"))));
} catch (UnsupportedEncodingException uee1) {
throw new RuntimeException("VM does not support UTF-8.", uee1);
}