예제 #1
0
 public bool ResetAccessPass(string password, string rowmodifiedby)
 {
     GenericProvider.HashStore.CustomHash _hash = new GenericProvider.HashStore.CustomHash();
     string _newPasswordHash = _hash.ComputeHash(password);
     DALAccess _dalAccess = new DALAccess();
     return (_dalAccess.UpdateAccessPass(idno, _newPasswordHash, _hash.saltValue, rowmodifiedby));
 }
예제 #2
0
        public byte UpdateAccessPass(string oldpassword, string passwordhash, string passwordsalt,
            string newpassword, string rowmodifiedby)
        {
            DALAccess _dalAccess = new DALAccess();

            if (VerifyUser(oldpassword, passwordhash, passwordsalt))
            {
                GenericProvider.HashStore.CustomHash _hash = new GenericProvider.HashStore.CustomHash();
                string _newPasswordHash = _hash.ComputeHash(newpassword);
                _dalAccess.UpdateAccessPass(idno, _newPasswordHash, _hash.saltValue, rowmodifiedby);
                return 1;
            }

            return 0;
        }