Minor - rename EncryptedPassword to HashedPassword
- We hash passwords; we don't encrypt them
This commit is contained in:
@@ -4,7 +4,7 @@ import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.security.PasswordSecurity;
|
||||
import fr.xephi.authme.security.crypts.EncryptedPassword;
|
||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||
import fr.xephi.authme.util.Utils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@@ -134,13 +134,13 @@ public class API {
|
||||
@Deprecated
|
||||
public static boolean registerPlayer(String playerName, String password) {
|
||||
String name = playerName.toLowerCase();
|
||||
EncryptedPassword encryptedPassword = passwordSecurity.computeHash(password, name);
|
||||
HashedPassword hashedPassword = passwordSecurity.computeHash(password, name);
|
||||
if (isRegistered(name)) {
|
||||
return false;
|
||||
}
|
||||
PlayerAuth auth = PlayerAuth.builder()
|
||||
.name(name)
|
||||
.password(encryptedPassword)
|
||||
.password(hashedPassword)
|
||||
.lastLogin(0)
|
||||
.realName(playerName)
|
||||
.build();
|
||||
|
||||
@@ -3,7 +3,7 @@ package fr.xephi.authme.api;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.security.crypts.EncryptedPassword;
|
||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||
import fr.xephi.authme.util.Utils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@@ -149,7 +149,7 @@ public class NewAPI {
|
||||
*/
|
||||
public boolean registerPlayer(String playerName, String password) {
|
||||
String name = playerName.toLowerCase();
|
||||
EncryptedPassword result = plugin.getPasswordSecurity().computeHash(password, name);
|
||||
HashedPassword result = plugin.getPasswordSecurity().computeHash(password, name);
|
||||
if (isRegistered(name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user