forked from ChomeNS/chipmunkmod
Update SBot hashing
This commit is contained in:
parent
951d4e35c1
commit
2dd7443d4c
1 changed files with 2 additions and 2 deletions
|
@ -52,9 +52,9 @@ public class BotValidationUtilities {
|
|||
if (key == null) throw new RuntimeException("The key of the bot is unspecified (null), did you incorrectly add it to your config?");
|
||||
|
||||
try {
|
||||
MessageDigest md = MessageDigest.getInstance("SHA-256");
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
String time = String.valueOf(System.currentTimeMillis() / 20000);
|
||||
String input = prefix + command.replaceAll("&[0-9a-fklmnorx]", "") + ";" + client.player.getName() + ";" + time + ";" + key;
|
||||
String input = prefix + command.replaceAll("&[0-9a-fklmnorx]", "") + ";" + client.player.getName().getString() + ";" + time + ";" + key;
|
||||
byte[] hash = md.digest(input.getBytes(StandardCharsets.UTF_8));
|
||||
BigInteger bigInt = new BigInteger(1, Arrays.copyOfRange(hash, 0, 4));
|
||||
String stringHash = bigInt.toString(Character.MAX_RADIX);
|
||||
|
|
Loading…
Reference in a new issue