From 52d537c42b84a5573782995d842a4741f5aa4515 Mon Sep 17 00:00:00 2001 From: Nikki Date: Tue, 29 Apr 2014 18:48:56 -0400 Subject: [PATCH] Rename getCryptedPassword to getHashedPassword. --- src/org/apollo/io/player/impl/BinaryPlayerSaver.java | 2 +- src/org/apollo/security/PlayerCredentials.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/apollo/io/player/impl/BinaryPlayerSaver.java b/src/org/apollo/io/player/impl/BinaryPlayerSaver.java index 301c2526..dbb2fef4 100644 --- a/src/org/apollo/io/player/impl/BinaryPlayerSaver.java +++ b/src/org/apollo/io/player/impl/BinaryPlayerSaver.java @@ -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()); diff --git a/src/org/apollo/security/PlayerCredentials.java b/src/org/apollo/security/PlayerCredentials.java index 0b59b030..6b625190 100644 --- a/src/org/apollo/security/PlayerCredentials.java +++ b/src/org/apollo/security/PlayerCredentials.java @@ -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); }