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 Channelchannel@Nonnull final ProtocolVersionprotocolVersion@Nonnull final Stringlanguage@Nonnull final UUIDplayerUuid@Nonnull final Stringusername@Nullable final byte[]referralData@Nullable final HostAddressreferralSource@Nullable final byte[]passwordChallenge@Nonnull final SetupHandlerSuppliersetupHandlerSupplier
getIdentifier
public
String
getIdentifier
()
Method getIdentifier.
ReadTimeoutHandler
public
new
ReadTimeoutHandler
(playTimeout.toMillis()
Method ReadTimeoutHandler.
- Parameters:
playTimeout.toMillis(playTimeout.toMillis(
PasswordAccepted
public
new
PasswordAccepted
()
Method PasswordAccepted.
PasswordRejected
public
new
PasswordRejected
(this.passwordChallenge, this.attemptsRemaining)
Method PasswordRejected.
- Parameters:
this.passwordChallengethis.passwordChallengethis.attemptsRemainingthis.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[]challengefinal Stringpassword