Class ServerboundKeyPacket
java.lang.Object
net.minecraft.network.protocol.login.ServerboundKeyPacket
- All Implemented Interfaces:
Packet<ServerLoginPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final byte[]
static final StreamCodec
<FriendlyByteBuf, ServerboundKeyPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionServerboundKeyPacket
(SecretKey pSecretKey, PublicKey pPublicKey, byte[] pChallenge) private
ServerboundKeyPacket
(FriendlyByteBuf p_179829_) -
Method Summary
Modifier and TypeMethodDescriptiongetSecretKey
(PrivateKey pKey) void
handle
(ServerLoginPacketListener pHandler) Passes this Packet on to the NetHandler for processing.boolean
isChallengeValid
(byte[] pExpected, PrivateKey pKey) type()
private void
write
(FriendlyByteBuf p_134870_) Writes the raw packet data to the data stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
keybytes
private final byte[] keybytes -
encryptedChallenge
private final byte[] encryptedChallenge
-
-
Constructor Details
-
ServerboundKeyPacket
public ServerboundKeyPacket(SecretKey pSecretKey, PublicKey pPublicKey, byte[] pChallenge) throws CryptException - Throws:
CryptException
-
ServerboundKeyPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
type
- Specified by:
type
in interfacePacket<ServerLoginPacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ServerLoginPacketListener>
-
getSecretKey
- Throws:
CryptException
-
isChallengeValid
-