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, waitisWritingErrorSkippableprivate byte[] encryptedSecretKey
private byte[] encryptedNonce
public LoginKeyC2SPacket()
@Environment(value=CLIENT) public LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) throws NetworkEncryptionException
NetworkEncryptionExceptionpublic void read(PacketByteBuf buf) throws IOException
read in interface Packet<ServerLoginPacketListener>IOExceptionpublic void write(PacketByteBuf buf) throws IOException
write in interface Packet<ServerLoginPacketListener>IOExceptionpublic void apply(ServerLoginPacketListener serverLoginPacketListener)
apply in interface Packet<ServerLoginPacketListener>public SecretKey decryptSecretKey(PrivateKey privateKey) throws NetworkEncryptionException
NetworkEncryptionExceptionpublic byte[] decryptNonce(PrivateKey privateKey) throws NetworkEncryptionException
NetworkEncryptionException