Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.inferno.net.login;
- import java.nio.channels.Channel;
- import com.inferno.net.packet.Packet;
- import com.inferno.net.security.IsaacRandom;
- import io.netty.channel.ChannelHandlerContext;
- /**
- * The {@link Packet} implementation that contains data used for the final
- * portion of the login protocol.
- *
- * @author lare96 <http://github.org/lare96>
- */
- public final class LoginDetailsMessage {
- /**
- * The context to which this player is going through.
- */
- private final ChannelHandlerContext context;
- /**
- * The username of the player.
- */
- private final String username;
- /**
- * The password of the player.
- */
- private final String password;
- /**
- * The player's host address
- */
- private final String host;
- /**
- * The player's client version.
- */
- private final int clientVersion;
- /**
- * The player's client uid.
- */
- private final int uid;
- /**
- * The encrypting isaac
- */
- private final IsaacRandom encryptor;
- /**
- * The decrypting isaac
- */
- private final IsaacRandom decryptor;
- /**
- * Creates a new {@link LoginDetailsMessage}.
- *
- * @param ctx
- * the {@link ChannelHandlerContext} that holds our
- * {@link Channel} instance.
- * @param username
- * the username of the player.
- * @param password
- * the password of the player.
- * @param encryptor
- * the encryptor for encrypting messages.
- * @param decryptor
- * the decryptor for decrypting messages.
- */
- public LoginDetailsMessage(ChannelHandlerContext context, String username, String password, String host, int clientVersion, int uid,
- IsaacRandom encryptor, IsaacRandom decryptor) {
- this.context = context;
- this.username = username;
- this.password = password;
- this.host = host;
- this.clientVersion = clientVersion;
- this.uid = uid;
- this.encryptor = encryptor;
- this.decryptor = decryptor;
- }
- public ChannelHandlerContext getContext() {
- return context;
- }
- public String getUsername() {
- return username;
- }
- public String getPassword() {
- return password;
- }
- public String getHost() {
- return host;
- }
- public int getClientVersion() {
- return clientVersion;
- }
- public int getUid() {
- return uid;
- }
- public IsaacRandom getEncryptor() {
- return encryptor;
- }
- public IsaacRandom getDecryptor() {
- return decryptor;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement