projects
/
demoscenemusic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change password hash from SHA512 to SHA256.
[demoscenemusic.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
demoscenemusic
/
data
/
DefaultUser.java
diff --git
a/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java
b/src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java
index
6867ef3
..
fb2836c
100644
(file)
--- a/
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java
+++ b/
src/main/java/net/pterodactylus/demoscenemusic/data/DefaultUser.java
@@
-64,7
+64,7
@@
public class DefaultUser extends DefaultBase implements User {
@Override
public User setPassword(String password) {
try {
@Override
public User setPassword(String password) {
try {
- getValue("password", String.class).set(Hex.toHex(MessageDigestHasher.getSHA
512
Hasher().hash(password.getBytes("UTF-8"))));
+ getValue("password", String.class).set(Hex.toHex(MessageDigestHasher.getSHA
256
Hasher().hash(password.getBytes("UTF-8"))));
return this;
} catch (UnsupportedEncodingException uee1) {
throw new RuntimeException("VM does not support UTF-8.", uee1);
return this;
} catch (UnsupportedEncodingException uee1) {
throw new RuntimeException("VM does not support UTF-8.", uee1);
@@
-86,7
+86,7
@@
public class DefaultUser extends DefaultBase implements User {
@Override
public boolean verifyPassword(String password) {
try {
@Override
public boolean verifyPassword(String password) {
try {
- return getValue("password", String.class).get().equalsIgnoreCase(Hex.toHex(MessageDigestHasher.getSHA
512
Hasher().hash(password.getBytes("UTF-8"))));
+ return getValue("password", String.class).get().equalsIgnoreCase(Hex.toHex(MessageDigestHasher.getSHA
256
Hasher().hash(password.getBytes("UTF-8"))));
} catch (UnsupportedEncodingException uee1) {
throw new RuntimeException("VM does not support UTF-8.", uee1);
}
} catch (UnsupportedEncodingException uee1) {
throw new RuntimeException("VM does not support UTF-8.", uee1);
}