Class LoginKeyC2SPacket
java.lang.Object
net.minecraft.network.packet.c2s.login.LoginKeyC2SPacket
- All Implemented Interfaces:
Packet<ServerLoginPacketListener>
- Mappings:
Namespace Name official aasintermediary net/minecraft/class_2917named net/minecraft/network/packet/c2s/login/LoginKeyC2SPacket
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final com.mojang.datafixers.util.Either<byte[],NetworkEncryptionUtils.SignatureData> The nonce value. -
Constructor Summary
ConstructorsConstructorDescriptionLoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, long seed, byte[] signature) -
Method Summary
Modifier and TypeMethodDescriptiondecryptSecretKey(PrivateKey privateKey) voidmethod_12653(ServerLoginPacketListener serverLoginPacketListener) booleanverifyEncryptedNonce(byte[] nonce, PrivateKey privateKey) booleanverifySignedNonce(byte[] nonce, SignatureVerifier verifier) 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
apply, isWritingErrorSkippable
-
Field Details
-
encryptedSecretKey
private final byte[] encryptedSecretKey- Mappings:
Namespace Name Mixin selector official aLaas;a:[Bintermediary field_13274Lnet/minecraft/class_2917;field_13274:[Bnamed encryptedSecretKeyLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;encryptedSecretKey:[B
-
nonce
The 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 official bLaas;b:Lcom/mojang/datafixers/util/Either;intermediary field_39089Lnet/minecraft/class_2917;field_39089:Lcom/mojang/datafixers/util/Either;named nonceLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;nonce:Lcom/mojang/datafixers/util/Either;
-
-
Constructor Details
-
LoginKeyC2SPacket
public LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) throws NetworkEncryptionException - Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official <init>Laas;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)Vintermediary <init>Lnet/minecraft/class_2917;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)Vnamed <init>Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)V
-
LoginKeyC2SPacket
public LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, long seed, byte[] signature) throws NetworkEncryptionException - Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official <init>Laas;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;J[B)Vintermediary <init>Lnet/minecraft/class_2917;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;J[B)Vnamed <init>Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;J[B)V
-
LoginKeyC2SPacket
- Mappings:
Namespace Name Mixin selector official <init>Laas;<init>(Lrt;)Vintermediary <init>Lnet/minecraft/class_2917;<init>(Lnet/minecraft/class_2540;)Vnamed <init>Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
-
Method Details
-
write
- Specified by:
writein interfacePacket<ServerLoginPacketListener>- Mappings:
Namespace Name Mixin selector official aLtx;a(Lrt;)Vintermediary method_11052Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)Vnamed writeLnet/minecraft/network/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
-
method_12653
- Mappings:
Namespace Name Mixin selector official aLaas;a(Laap;)Vintermediary method_12653Lnet/minecraft/class_2917;method_12653(Lnet/minecraft/class_2911;)Vnamed method_12653Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;method_12653(Lnet/minecraft/network/listener/ServerLoginPacketListener;)V
-
decryptSecretKey
- Throws:
NetworkEncryptionException- Mappings:
Namespace Name Mixin selector official aLaas;a(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;intermediary method_12654Lnet/minecraft/class_2917;method_12654(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;named decryptSecretKeyLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;decryptSecretKey(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;
-
verifySignedNonce
- Mappings:
Namespace Name Mixin selector official aLaas;a([BLanw;)Zintermediary method_43643Lnet/minecraft/class_2917;method_43643([BLnet/minecraft/class_7500;)Znamed verifySignedNonceLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;verifySignedNonce([BLnet/minecraft/network/encryption/SignatureVerifier;)Z
-
verifyEncryptedNonce
- Mappings:
Namespace Name Mixin selector official aLaas;a([BLjava/security/PrivateKey;)Zintermediary method_43644Lnet/minecraft/class_2917;method_43644([BLjava/security/PrivateKey;)Znamed verifyEncryptedNonceLnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;verifyEncryptedNonce([BLjava/security/PrivateKey;)Z
-