Esempio n. 1
0
 public ConnectionMessage(NetOutgoingMessage msg, string username, string password)
 {
     SubDataType = ConnectMsgType.LoginSuccess;
     msg.Write((byte)NetMsgType.Login);
     byte[] xUsername = Xor(Encoding.UTF8.GetBytes(username), EncryptionKey);
     byte[] xPassword = Xor(Encoding.UTF8.GetBytes(password), EncryptionKey);
     string encryptedUsername = Encoding.UTF8.GetChars(xUsername).ToString();
     string encryptedPassword = Encoding.UTF8.GetChars(xPassword).ToString();
     msg.Write(encryptedUsername);
     msg.Write(encryptedPassword);
 }
Esempio n. 2
0
        public ConnectionMessage(NetOutgoingMessage msg, string username, string password)
        {
            SubDataType = ConnectMsgType.LoginSuccess;
            msg.Write((byte)NetMsgType.Login);
            byte[] xUsername         = Xor(Encoding.UTF8.GetBytes(username), EncryptionKey);
            byte[] xPassword         = Xor(Encoding.UTF8.GetBytes(password), EncryptionKey);
            string encryptedUsername = Encoding.UTF8.GetChars(xUsername).ToString();
            string encryptedPassword = Encoding.UTF8.GetChars(xPassword).ToString();

            msg.Write(encryptedUsername);
            msg.Write(encryptedPassword);
        }
Esempio n. 3
0
 public ConnectionMessage(NetOutgoingMessage msg, ConnectMsgType type)
 {
     msg.Write((byte)type);
     Username = null;
     Password = null;
 }
Esempio n. 4
0
 public ConnectionMessage(NetIncomingMessage msg)
 {
     SubDataType = (ConnectMsgType)msg.ReadByte();
 }
Esempio n. 5
0
 public ConnectionMessage(NetIncomingMessage msg)
 {
     SubDataType = (ConnectMsgType)msg.ReadByte();
 }
Esempio n. 6
0
 public ConnectionMessage(NetOutgoingMessage msg, ConnectMsgType type)
 {
     msg.Write((byte)type);
     Username = null;
     Password = null;
 }