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 secretKey, PublicKey publicKey, byte[] challenge) private -
Method Summary
Modifier and TypeMethodDescriptiongetSecretKey(PrivateKey privateKey) voidhandle(ServerLoginPacketListener listener) booleanisChallengeValid(byte[] challenge, PrivateKey privateKey) type()private voidwrite(FriendlyByteBuf output) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
keybytes
private final byte[] keybytes -
encryptedChallenge
private final byte[] encryptedChallenge
-
-
Constructor Details
-
ServerboundKeyPacket
public ServerboundKeyPacket(SecretKey secretKey, PublicKey publicKey, byte[] challenge) throws CryptException - Throws:
CryptException
-
ServerboundKeyPacket
-
-
Method Details
-
write
-
type
- Specified by:
typein interfacePacket<ServerLoginPacketListener>
-
handle
- Specified by:
handlein interfacePacket<ServerLoginPacketListener>
-
getSecretKey
- Throws:
CryptException
-
isChallengeValid
-