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

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members