PasswordPacketHandler

public class PasswordPacketHandler extends GenericConnectionPacketHandler

Class PasswordPacketHandler. Provides passwordpackethandler functionality for the Hytale server.

java.lang.Object > GenericConnectionPacketHandler > PasswordPacketHandler

Field Summary

passwordChallenge

private byte[] passwordChallenge

Field passwordChallenge.

attemptsRemaining

private int attemptsRemaining

Field attemptsRemaining.

playTimeout

final Duration playTimeout

Field playTimeout.

clientHash

final byte[] clientHash

Field clientHash.

password

final String password

Field password.

expectedHash

final byte[] expectedHash

Field expectedHash.

challenge

final byte[] challenge

Field challenge.

digest

final MessageDigest digest

Field digest.

Method Detail

PasswordPacketHandler

public public PasswordPacketHandler (@Nonnull final Channel channel, @Nonnull final ProtocolVersion protocolVersion, @Nonnull final String language, @Nonnull final UUID playerUuid, @Nonnull final String username, @Nullable final byte[] referralData, @Nullable final HostAddress referralSource, @Nullable final byte[] passwordChallenge, @Nonnull final SetupHandlerSupplier setupHandlerSupplier)

Method PasswordPacketHandler.

Parameters:
@Nonnull final Channel channel
@Nonnull final ProtocolVersion protocolVersion
@Nonnull final String language
@Nonnull final UUID playerUuid
@Nonnull final String username
@Nullable final byte[] referralData
@Nullable final HostAddress referralSource
@Nullable final byte[] passwordChallenge
@Nonnull final SetupHandlerSupplier setupHandlerSupplier

getIdentifier

public String getIdentifier ()

Method getIdentifier.

registered0

public void registered0 (final PacketHandler oldHandler)

Method registered0.

Parameters:
final PacketHandler oldHandler

ReadTimeoutHandler

public new ReadTimeoutHandler (playTimeout.toMillis()

Method ReadTimeoutHandler.

Parameters:
playTimeout.toMillis( playTimeout.toMillis(

accept

public void accept (@Nonnull final Packet packet)

Method accept.

Parameters:
@Nonnull final Packet packet

handle

public void handle (@Nonnull final Disconnect packet)

Method handle.

Parameters:
@Nonnull final Disconnect packet

PasswordAccepted

public new PasswordAccepted ()

Method PasswordAccepted.

PasswordRejected

public new PasswordRejected (this.passwordChallenge, this.attemptsRemaining)

Method PasswordRejected.

Parameters:
this.passwordChallenge this.passwordChallenge
this.attemptsRemaining this.attemptsRemaining

generateChallenge

static byte[] generateChallenge ()

Method generateChallenge.

SecureRandom

public new SecureRandom ()

Method SecureRandom.

proceedToSetup

private void proceedToSetup ()

Method proceedToSetup.

computePasswordHash

static byte[] computePasswordHash (final byte[] challenge, final String password)

Method computePasswordHash.

Parameters:
final byte[] challenge
final String password