Class LoginKeyC2SPacket

java.lang.Object
net.minecraft.network.packet.c2s.login.LoginKeyC2SPacket
All Implemented Interfaces:
Packet<ServerLoginPacketListener>

public class LoginKeyC2SPacket extends Object implements Packet<ServerLoginPacketListener>
Mappings:
Namespace Name
official aip
intermediary net/minecraft/class_2917
named net/minecraft/network/packet/c2s/login/LoginKeyC2SPacket
  • Field Details

    • CODEC

      public static final PacketCodec<PacketByteBuf,LoginKeyC2SPacket> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Laip;a:Lys;
      intermediary field_48251 Lnet/minecraft/class_2917;field_48251:Lnet/minecraft/class_9139;
      named CODEC Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
    • encryptedSecretKey

      private final byte[] encryptedSecretKey
      Mappings:
      Namespace Name Mixin selector
      official b Laip;b:[B
      intermediary field_13274 Lnet/minecraft/class_2917;field_13274:[B
      named encryptedSecretKey Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;encryptedSecretKey:[B
    • nonce

      private final byte[] 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 c Laip;c:[B
      intermediary field_39089 Lnet/minecraft/class_2917;field_39089:[B
      named nonce Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;nonce:[B
  • Constructor Details

    • LoginKeyC2SPacket

      public LoginKeyC2SPacket(SecretKey secretKey, PublicKey publicKey, byte[] nonce) throws NetworkEncryptionException
      Throws:
      NetworkEncryptionException
      Mappings:
      Namespace Name Mixin selector
      official <init> Laip;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)V
      intermediary <init> Lnet/minecraft/class_2917;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)V
      named <init> Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Ljavax/crypto/SecretKey;Ljava/security/PublicKey;[B)V
    • LoginKeyC2SPacket

      private LoginKeyC2SPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Laip;<init>(Lvu;)V
      intermediary <init> Lnet/minecraft/class_2917;<init>(Lnet/minecraft/class_2540;)V
      named <init> Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
  • Method Details

    • write

      private void write(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Laip;a(Lvu;)V
      intermediary method_56021 Lnet/minecraft/class_2917;method_56021(Lnet/minecraft/class_2540;)V
      named write Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;write(Lnet/minecraft/network/PacketByteBuf;)V
    • getPacketId

      public PacketType<LoginKeyC2SPacket> getPacketId()
      Specified by:
      getPacketId in interface Packet<ServerLoginPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lzb;a()Lzd;
      intermediary method_55846 Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;
      named getPacketId Lnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;
    • apply

      public void apply(ServerLoginPacketListener serverLoginPacketListener)
      Specified by:
      apply in interface Packet<ServerLoginPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Laip;a(Laim;)V
      intermediary method_12653 Lnet/minecraft/class_2917;method_12653(Lnet/minecraft/class_2911;)V
      named apply Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;apply(Lnet/minecraft/network/listener/ServerLoginPacketListener;)V
    • decryptSecretKey

      public SecretKey decryptSecretKey(PrivateKey privateKey) throws NetworkEncryptionException
      Throws:
      NetworkEncryptionException
      Mappings:
      Namespace Name Mixin selector
      official a Laip;a(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;
      intermediary method_12654 Lnet/minecraft/class_2917;method_12654(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;
      named decryptSecretKey Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;decryptSecretKey(Ljava/security/PrivateKey;)Ljavax/crypto/SecretKey;
    • verifySignedNonce

      public boolean verifySignedNonce(byte[] nonce, PrivateKey privateKey)
      Mappings:
      Namespace Name Mixin selector
      official a Laip;a([BLjava/security/PrivateKey;)Z
      intermediary method_43643 Lnet/minecraft/class_2917;method_43643([BLjava/security/PrivateKey;)Z
      named verifySignedNonce Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;verifySignedNonce([BLjava/security/PrivateKey;)Z