mirror of
https://github.com/Quackster/Havana.git
synced 2025-07-05 06:07: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()];
|
byte[] tOriginalMsgBytes = new byte[buffer.readableBytes()];
|
||||||
buffer.readBytes(tOriginalMsgBytes);
|
buffer.readBytes(tOriginalMsgBytes);
|
||||||
|
|
||||||
String tOriginalMsg = new String(tOriginalMsgBytes);
|
String tOriginalMsg = new String(tOriginalMsgBytes, StringUtil.getCharset());
|
||||||
|
|
||||||
String tHeader;
|
String tHeader;
|
||||||
String tMsg;
|
String tMsg;
|
||||||
|
@ -57,8 +57,8 @@ public class EncryptionEncoder extends MessageToMessageEncoder<ByteBuf> {
|
||||||
|
|
||||||
var tEncryptedMsg = Unpooled.buffer();
|
var tEncryptedMsg = Unpooled.buffer();
|
||||||
|
|
||||||
tEncryptedMsg.writeBytes(tHeader.getBytes());
|
tEncryptedMsg.writeBytes(tHeader.getBytes(StringUtil.getCharset()));
|
||||||
tEncryptedMsg.writeBytes(tMsg.getBytes());
|
tEncryptedMsg.writeBytes(tMsg.getBytes(StringUtil.getCharset()));
|
||||||
|
|
||||||
out.add(tEncryptedMsg);
|
out.add(tEncryptedMsg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue