asp.net - How to hash a password and save into a database table? -
asp.net - How to hash a password and save into a database table? -
i have form register.aspx
, login function , using vb.net
in register.aspx
have 2 textboxes, user name , password , submit button. if user click's on submit button, password hashed , stored username in database table called customer
i know-
1) how hash password?
2) how compare hashed value in database password entered in textbox while login?
to reply questions in order.
you utilize 1 of crypto classes, next documentaion. you store hashed value in database, when query database, utilize hash.psuedo code:
function getuser(name, password) hashedpassword = hash(password) sqlcmd = 'select userkey user username = @name , password = @pass' add together cmd parameter ('@name', name) add together cmd parameter ('@pass', hashedpassword) userkey = cmd.executequry homecoming userkey end function
that said, don't if can implement openid instead. world doesn't need site have remember or share password no reason.
asp.net vb.net hash passwords
Comments
Post a Comment