Пример #1
0
        private bool checkRecord(string email, string box)
        {
            try
            {
                var temp = LoginTable.Find(item => item.Email == email);
                Console.Write(temp.Password);
                if (SaltPassword.VerifyHash(passwordTextBox.Text, "SHA512", temp.Password) == true)
                {
                    SessionInfo.UserID   = temp.UserLogin;
                    SessionInfo.UserName = temp.Email;

                    Console.WriteLine(SessionInfo.UserID);
                    return(true);
                }
                else
                {
                    return(false);
                }
                ;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            return(false);
        }
Пример #2
0
 private bool checkRecord(string email, string box)
 {
     try {
         LoginInfo temp = LoginTable.Find(item => item.Email == email);
         Console.Write(temp.Password);
         if (SaltPassword.VerifyHash("JohnWick", "SHA512", temp.Password) == true)
         {
             MessageBox.Show("Welcome My N***a");
             return(true);
         }
         else
         {
             return(false);
         };
     } catch (Exception e) {
         Console.WriteLine(e);
     }
     return(false);
 }