Netty WIP

Implementing ByteBuf backed In/OutPacket first in a separate branch
This commit is contained in:
P0nk
2021-06-15 22:12:23 +02:00
parent 4dc0935391
commit 23bad12f8c
14 changed files with 301 additions and 66 deletions

View File

@@ -0,0 +1,28 @@
package net.netty;
import constants.net.ServerConstants;
import tools.MapleAESOFB;
public class ClientCyphers {
private final MapleAESOFB send;
private final MapleAESOFB receive;
private ClientCyphers(MapleAESOFB send, MapleAESOFB receive) {
this.send = send;
this.receive = receive;
}
public static ClientCyphers generateNew() {
MapleAESOFB send = new MapleAESOFB(InitializationVector.generateSend(), ServerConstants.VERSION);
MapleAESOFB receive = new MapleAESOFB(InitializationVector.generateReceive(), ServerConstants.VERSION);
return new ClientCyphers(send, receive);
}
public MapleAESOFB getSendCypher() {
return send;
}
public MapleAESOFB getReceiveCypher() {
return receive;
}
}