public class PacketFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
channelID |
private byte[] |
initPayload |
private MyCTRCipher[] |
m_arcipherDecrypt |
private int |
mixCount |
private PublicKey[] |
publicKeys |
private byte[][] |
requestChannelKeys |
private Counter |
requestCounter |
private byte[][] |
responseChannelKeys |
Constructor and Description |
---|
PacketFactory(byte[][] symKeys) |
PacketFactory(int channelID,
byte[] initPayload,
PublicKey[] publicKeys) |
Modifier and Type | Method and Description |
---|---|
int |
getChannelID() |
byte[][] |
getRequestChannelKeys() |
byte[][] |
getResponseChannelKeys() |
DataPacket |
makeDataPacket(Fragment fragment) |
InitPacket |
makeInitPacket(Fragment fragment) |
DataPacket |
myprocess(DataPacket packet) |
static ProcessedDataPacket |
process(DataPacket packet,
byte[] channelKey) |
(package private) ProcessedInitPacket |
process(InitPacket packet,
PrivateKey privateKey) |
private int channelID
private byte[] initPayload
private PublicKey[] publicKeys
private byte[][] requestChannelKeys
private byte[][] responseChannelKeys
private MyCTRCipher[] m_arcipherDecrypt
private int mixCount
private Counter requestCounter
public PacketFactory(int channelID, byte[] initPayload, PublicKey[] publicKeys)
public PacketFactory(byte[][] symKeys)
ProcessedInitPacket process(InitPacket packet, PrivateKey privateKey) throws SymmetricKeyCreationFailed, DecryptionFailed
public static ProcessedDataPacket process(DataPacket packet, byte[] channelKey) throws DecryptionFailed
DecryptionFailed
public DataPacket myprocess(DataPacket packet) throws DecryptionFailed
DecryptionFailed
public InitPacket makeInitPacket(Fragment fragment) throws PacketCreationFailed
PacketCreationFailed
public DataPacket makeDataPacket(Fragment fragment) throws PacketCreationFailed
PacketCreationFailed
public byte[][] getRequestChannelKeys()
public byte[][] getResponseChannelKeys()
public int getChannelID()
Copyright © 2023. All rights reserved.