public class LoginKeyC2SPacket extends Object implements Packet<ServerLoginPacketListener>
Modifier and Type | Field and Description |
---|---|
private byte[] |
encryptedNonce |
private byte[] |
encryptedSecretKey |
Constructor and Description |
---|
LoginKeyC2SPacket() |
LoginKeyC2SPacket(SecretKey secretKey,
PublicKey publicKey,
byte[] nonce) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ServerLoginPacketListener serverLoginPacketListener) |
byte[] |
decryptNonce(PrivateKey privateKey) |
SecretKey |
decryptSecretKey(PrivateKey privateKey) |
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWritingErrorSkippable
private byte[] encryptedSecretKey
private byte[] encryptedNonce
public LoginKeyC2SPacket()
@Environment(value=CLIENT) public LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) throws NetworkEncryptionException
NetworkEncryptionException
public void read(PacketByteBuf buf) throws IOException
read
in interface Packet<ServerLoginPacketListener>
IOException
public void write(PacketByteBuf buf) throws IOException
write
in interface Packet<ServerLoginPacketListener>
IOException
public void apply(ServerLoginPacketListener serverLoginPacketListener)
apply
in interface Packet<ServerLoginPacketListener>
public SecretKey decryptSecretKey(PrivateKey privateKey) throws NetworkEncryptionException
NetworkEncryptionException
public byte[] decryptNonce(PrivateKey privateKey) throws NetworkEncryptionException
NetworkEncryptionException