Ejemplo n.º 1
0
        public void SetPassword(string password)
        {
            //New salt
            _passwordSalt = Password.CreateRandomSalt();

            //intialise the password
            Password pwd = new Password(password, _passwordSalt);

            //generae and store the salted hash
            _passwordSaltedHash = pwd.ComputeSaltedHash();
        }
Ejemplo n.º 2
0
        public bool ValidateLogin(string password)
        {
            Password pwd = new Password(password, _passwordSalt);

            if (pwd.ComputeSaltedHash() == _passwordSaltedHash)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        public void SetPassword(string password)
        {
            //New salt
            _passwordSalt = Password.CreateRandomSalt();

            //intialise the password
            Password pwd = new Password(password, _passwordSalt);

            //generae and store the salted hash
            _passwordSaltedHash = pwd.ComputeSaltedHash();
        }
Ejemplo n.º 4
0
 public bool ValidateLogin(string password)
 {
     Password pwd = new Password(password, _passwordSalt);
     if(pwd.ComputeSaltedHash() == _passwordSaltedHash)
         return true;
     else return false;
 }