Rename getCryptedPassword to getHashedPassword.

This commit is contained in:
Nikki
2014-04-29 18:48:56 -04:00
parent c197010bb4
commit 52d537c42b
2 changed files with 3 additions and 3 deletions
@@ -33,7 +33,7 @@ public final class BinaryPlayerSaver implements PlayerSaver {
try (DataOutputStream out = new DataOutputStream(new FileOutputStream(file))) {
// write credentials and privileges
StreamUtil.writeString(out, player.getUsername());
StreamUtil.writeString(out, player.getCredentials().getCryptedPassword());
StreamUtil.writeString(out, player.getCredentials().getHashedPassword());
out.writeByte(player.getPrivilegeLevel().toInteger());
out.writeBoolean(player.isMembers());
@@ -62,10 +62,10 @@ public final class PlayerCredentials {
}
/**
* Gets the crypted password
* Gets the hashed password
* @return The password (either the original loaded from file or scrypted)
*/
public String getCryptedPassword() {
public String getHashedPassword() {
return password.startsWith("$s0$") ? password : SCryptUtil.scrypt(password, 16384, 8, 1);
}