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());
|
cipher.init(Cipher.ENCRYPT_MODE, Config.HANDLER.instance().getRawKey(), Config.HANDLER.instance().getRawIv());
|
||||||
String strippedMessage = message_content.replace("®", "");
|
String strippedMessage = message_content.replace("®", "");
|
||||||
byte[] decodedMessage = ChatCoder.decodeFromBmp(strippedMessage);
|
byte[] decodedMessage = ChatCoder.decodeFromBmp(strippedMessage);
|
||||||
Cipher decryptingCipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
|
cipher.update(decodedMessage);
|
||||||
decryptingCipher.update(decodedMessage);
|
String decryptedMessage = new String(cipher.doFinal());
|
||||||
String decryptedMessage = new String(decryptingCipher.doFinal());
|
|
||||||
String outputMessage = "{" + player_name + "} " + decryptedMessage;
|
String outputMessage = "{" + player_name + "} " + decryptedMessage;
|
||||||
MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of(outputMessage));
|
MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of(outputMessage));
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user