Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

How to encrypt and check a login password.

$
0
0
Hi,I am trying to learn how to store a web form password and than check it when the user log in. So far none of the code I can find works. Can someone explain why the following test does not work and what the correct code should be?Insert Into [user]values ('name', 'email', HashBytes('SHA1', 'bob'))GOWhy does the following produce no rows?SELECT *From [user]Where HashBytes('SHA1', password) = HashBytes('SHA1', 'bob')ThanksFor the help

Viewing all articles
Browse latest Browse all 3145

Trending Articles