title: Password hashing in a C# Windows app, absent ASP.NET's FormsAuthentication?
body: <p>My Win form app doesn't seem to like FormsAuthentication, I'm totally new to hashing so any help to convert this would be very welcome. Thanks.</p>
  
  <pre><code>//Write hash
  protected TextBox tbPassword;
  protected Literal liHashedPassword;
  
  {
    string strHashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(tbPassword.Text, "sha1");
    liHashedPassword.Text = "Hashed Password is: " + strHashedPassword;    
  }
  
  //read hash
  string strUserInputtedHashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile( tbPassword.Text, "sha1");
  if(strUserInputtedHashedPassword == GetUsersHashedPasswordUsingUserName(tbUserName.Text))
  {
    // sign-in successful
  }
  else
  {
    // sign-in failed
  }
  </code></pre>