Remove redundant cipher
This commit is contained in:
parent
1b21099378
commit
1c0dd64566
@ -36,9 +36,8 @@ public class SecureChat implements ClientModInitializer {
|
||||
cipher.init(Cipher.ENCRYPT_MODE, Config.HANDLER.instance().getRawKey(), Config.HANDLER.instance().getRawIv());
|
||||
String strippedMessage = message_content.replace("®", "");
|
||||
byte[] decodedMessage = ChatCoder.decodeFromBmp(strippedMessage);
|
||||
Cipher decryptingCipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
||||
decryptingCipher.update(decodedMessage);
|
||||
String decryptedMessage = new String(decryptingCipher.doFinal());
|
||||
cipher.update(decodedMessage);
|
||||
String decryptedMessage = new String(cipher.doFinal());
|
||||
String outputMessage = "{" + player_name + "} " + decryptedMessage;
|
||||
MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of(outputMessage));
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user