Exemple #1
0
        public static Boolean register(string login, string password)
        {
            string hash = SHA.hashBytePassHex(password);

            Connection.data = "0010|" + login + "|" + hash;

            if (Connection.send(Connection.data) == "0010|True")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
        public static Boolean changepass(string login, string oldpass, string newpass)
        {
            string oldpass_hash = SHA.hashBytePassHex(oldpass);
            string newpass_hash = SHA.hashBytePassHex(newpass);

            Connection.data = "0100|" + login + "|" + oldpass_hash + "|" + newpass_hash;

            if (Connection.send(Connection.data) == "0100|True")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #3
0
        public static Boolean login(string login, string password)
        {
            string hash = SHA.hashBytePassHex(password);
            string ip   = GetLocalIPAddress();

            Connection.data = "0001|" + login + "|" + hash + "|" + ip;

            if (Connection.send(Connection.data) == "0001|True")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }