Class PasswordPacketHandler
java.lang.Object
com.hypixel.hytale.server.core.io.PacketHandler
com.hypixel.hytale.server.core.io.handlers.GenericConnectionPacketHandler
com.hypixel.hytale.server.core.io.handlers.login.PasswordPacketHandler
- All Implemented Interfaces:
IPacketReceiver
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.hypixel.hytale.server.core.io.PacketHandler
PacketHandler.DisconnectReason, PacketHandler.PingInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final intprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate static final intprivate static final intprivate byte[]private final UUIDprivate final byte[]private final HostAddressprivate final PasswordPacketHandler.SetupHandlerSupplierprivate final StringFields inherited from class com.hypixel.hytale.server.core.io.handlers.GenericConnectionPacketHandler
languageFields inherited from class com.hypixel.hytale.server.core.io.PacketHandler
auth, channel, clientReadyForChunksFuture, clientReadyForChunksFutureStack, disconnectReason, MAX_PACKET_ID, pingIdRandom, pingInfo, protocolVersion, queuedPackets, queuePackets, registered -
Constructor Summary
ConstructorsConstructorDescriptionPasswordPacketHandler(io.netty.channel.Channel channel, ProtocolVersion protocolVersion, String language, UUID playerUuid, String username, byte[] referralData, HostAddress referralSource, byte[] passwordChallenge, PasswordPacketHandler.SetupHandlerSupplier setupHandlerSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate static byte[]computePasswordHash(byte[] challenge, String password) private static byte[]voidhandle(PasswordResponse packet) voidhandle(Disconnect packet) private voidvoidregistered0(PacketHandler oldHandler) Methods inherited from class com.hypixel.hytale.server.core.io.PacketHandler
clearTimeout, closed, disconnect, disconnect0, getAuth, getChannel, getClientReadyForChunksFuture, getDisconnectReason, getOperationTimeoutThreshold, getPacketStatsRecorder, getPingInfo, getProtocolVersion, getQueuedPacketsCount, handle, handlePong, isCompressionEnabled, isLANConnection, isLocalConnection, logCloseMessage, logConnectionTimings, registered, sendPing, setClientReadyForChunksFuture, setCompressionEnabled, setQueuePackets, setTimeout, stillActive, tickPing, tryFlush, unregistered, unregistered0, write, write, write, writeNoCache, writePacket
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
PASSWORD_TIMEOUT_SECONDS
private static final int PASSWORD_TIMEOUT_SECONDS- See Also:
-
MAX_PASSWORD_ATTEMPTS
private static final int MAX_PASSWORD_ATTEMPTS- See Also:
-
CHALLENGE_LENGTH
private static final int CHALLENGE_LENGTH- See Also:
-
playerUuid
-
username
-
referralData
private final byte[] referralData -
referralSource
-
passwordChallenge
private byte[] passwordChallenge -
setupHandlerSupplier
-
attemptsRemaining
private int attemptsRemaining
-
-
Constructor Details
-
PasswordPacketHandler
public PasswordPacketHandler(@Nonnull io.netty.channel.Channel channel, @Nonnull ProtocolVersion protocolVersion, @Nonnull String language, @Nonnull UUID playerUuid, @Nonnull String username, @Nullable byte[] referralData, @Nullable HostAddress referralSource, @Nullable byte[] passwordChallenge, @Nonnull PasswordPacketHandler.SetupHandlerSupplier setupHandlerSupplier)
-
-
Method Details
-
getIdentifier
- Specified by:
getIdentifierin classPacketHandler
-
registered0
- Overrides:
registered0in classPacketHandler
-
accept
- Specified by:
acceptin classPacketHandler
-
handle
-
handle
-
generateChallenge
private static byte[] generateChallenge() -
proceedToSetup
private void proceedToSetup() -
computePasswordHash
-