Ejemplo n.º 1
0
        public bool Login(Account account, string password)
        {
            try
            {
                var salt = Convert.FromBase64String(account.Salt);
                var hash = HashAlgorithm.GenerateExistingHash(password, salt);

                return(hash == account.Hash);
            }
            catch (Exception)
            {
                return(false);
            }
        }