I am trying to hash password field and then comparing it. I updated table as shown below. But when i try to compare and find the password that matches wtih the password i have entered. No result. What is wrong with tihis?
Thanks in advance.
Table column description :
pass varbinary(256) Unchecked
Update Pass field :
update Tab_Users set Pass = HashBytes('SHA1', '1234567') where UserId = 10
After update here is the pass :
SELECT pass FROM Tab_Users where UserId = 10
Compare pass field :
SELECT * FROM Tab_Users
where pwdcompare(HashBytes('SHA1', '1234567'),pass) = 1 AND UserId = 10