Class LoginKeyC2SPacket
java.lang.Object
net.minecraft.network.packet.c2s.login.LoginKeyC2SPacket
- All Implemented Interfaces:
Packet<ServerLoginPacketListener>
- Mappings:
Namespace Name named net/minecraft/network/packet/c2s/login/LoginKeyC2SPacketintermediary net/minecraft/class_2917official aiz
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<PacketByteBuf, LoginKeyC2SPacket> private final byte[]private final byte[]The nonce value. -
Constructor Summary
ConstructorsModifierConstructorDescriptionLoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) private -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ServerLoginPacketListener serverLoginPacketListener) decryptSecretKey(PrivateKey privateKey) booleanverifySignedNonce(byte[] nonce, PrivateKey privateKey) private voidwrite(PacketByteBuf buf) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable, transitionsNetworkState
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48251Lnet/minecraft/class_2917;field_48251:Lnet/minecraft/class_9139;official aLaiz;a:Lyx;
-
encryptedSecretKey
private final byte[] encryptedSecretKey- Mappings:
Namespace Name Mixin selector named encryptedSecretKeyLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;encryptedSecretKey:[Bintermediary field_13274Lnet/minecraft/class_2917;field_13274:[Bofficial bLaiz;b:[B
-
nonce
private final byte[] nonceThe nonce value.- Implementation Note:
- This value is either encrypted (the left side of
Either) or signed (the right side). If encrypted, then it must be done so using the server's public key and the server verifies it by decrypting and comparing nonces. If signed, then it must be done so using the user's private key provided from Mojang's server, and the server verifies by checking if the reconstructed data can be verified using the public key. - Mappings:
Namespace Name Mixin selector named nonceLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;nonce:[Bintermediary field_39089Lnet/minecraft/class_2917;field_39089:[Bofficial cLaiz;c:[B
-
-
Constructor Details
-
LoginKeyC2SPacket
public LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) throws NetworkEncryptionException - Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)Vintermediary <init>Lnet/minecraft/class_2917;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)Vofficial <init>Laiz;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)V
-
LoginKeyC2SPacket
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)Vintermediary <init>Lnet/minecraft/class_2917;<init>(Lnet/minecraft/class_2540;)Vofficial <init>Laiz;<init>(Lvw;)V
-
-
Method Details
-
write
- Mappings:
Namespace Name Mixin selector named writeLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;write(Lnet/minecraft/network/PacketByteBuf;)Vintermediary method_56021Lnet/minecraft/class_2917;method_56021(Lnet/minecraft/class_2540;)Vofficial aLaiz;a(Lvw;)V
-
getPacketId
- Specified by:
getPacketIdin interfacePacket<ServerLoginPacketListener>- Mappings:
Namespace Name Mixin selector named getPacketIdLnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;intermediary method_55846Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;official aLzg;a()Lzi;
-
apply
- Specified by:
applyin interfacePacket<ServerLoginPacketListener>- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;apply(Lnet/minecraft/network/listener/ServerLoginPacketListener;)Vintermediary method_12653Lnet/minecraft/class_2917;method_12653(Lnet/minecraft/class_2911;)Vofficial aLaiz;a(Laiw;)V
-
decryptSecretKey
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector named decryptSecretKeyLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;decryptSecretKey(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;intermediary method_12654Lnet/minecraft/class_2917;method_12654(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;official aLaiz;a(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;
-
verifySignedNonce
- Mappings:
Namespace Name Mixin selector named verifySignedNonceLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;verifySignedNonce([BLjava/security/PrivateKey;)Zintermediary method_43643Lnet/minecraft/class_2917;method_43643([BLjava/security/PrivateKey;)Zofficial aLaiz;a([BLjava/security/PrivateKey;)Z
-