mirror of
https://github.com/Quackster/Havana.git
synced 2025-07-04 21:57:46 +00:00
Update EncryptionEncoder.java
This commit is contained in:
parent
fc27b5e1a5
commit
87bb4ff48e
1 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ public class EncryptionEncoder extends MessageToMessageEncoder<ByteBuf> {
|
|||
byte[] tOriginalMsgBytes = new byte[buffer.readableBytes()];
|
||||
buffer.readBytes(tOriginalMsgBytes);
|
||||
|
||||
String tOriginalMsg = new String(tOriginalMsgBytes);
|
||||
String tOriginalMsg = new String(tOriginalMsgBytes, StringUtil.getCharset());
|
||||
|
||||
String tHeader;
|
||||
String tMsg;
|
||||
|
@ -57,9 +57,9 @@ public class EncryptionEncoder extends MessageToMessageEncoder<ByteBuf> {
|
|||
|
||||
var tEncryptedMsg = Unpooled.buffer();
|
||||
|
||||
tEncryptedMsg.writeBytes(tHeader.getBytes());
|
||||
tEncryptedMsg.writeBytes(tMsg.getBytes());
|
||||
tEncryptedMsg.writeBytes(tHeader.getBytes(StringUtil.getCharset()));
|
||||
tEncryptedMsg.writeBytes(tMsg.getBytes(StringUtil.getCharset()));
|
||||
|
||||
out.add(tEncryptedMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue