password hashing c# windows app, absent asp.net's formsauthentication?
my win form app doesn't seem formsauthentication, i'm totally new hashing any assistance modify unequivocally welcome. thanks.
//write hash
protected textbox tbpassword;
protected verbatim lihashedpassword;
{
twine strhashedpassword = formsauthentication.hashpasswordforstoringinconfigfile(tbpassword.text, "sha1");
lihashedpassword.text = "hashed evidence is: " + strhashedpassword;
}
//read hash
string struserinputtedhashedpassword = formsauthentication.hashpasswordforstoringinconfigfile( tbpassword.text, "sha1");
if(struserinputtedhashedpassword == getusershashedpasswordusingusername(tbusername.text))
{
// sign-in successful
}
else
{
// sign-in failed
}
Comments
Post a Comment