title: FormsAuthentication.HashPasswordForStoringInConfigFile returns different strings
body: <p>I am doing a login page where I use SHA1 to hash password entered. I generate salt string. Add password to the generated salt string, and then hash it. </p>
  
  <p>This is how I store values when I register. I store only the username, hashed password and the saltstring</p>
  
  <pre><code>string saltString = retSaltString();//This returns a salt string
  string password = txtPassword.Text;
  string saltPassword = password + saltString;
  string hashPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(saltPassword, "SHA1");
  </code></pre>
  
  <p>And when I authenticate user, I do the same in reverse:</p>
  
  <pre><code>string hashedPassword = //from database
  string saltString = //from database
  string saltPassword = txtPassword.Text + saltString;
  string hashEnterPassword =   
  FormsAuthentication.HashPasswordForStoringInConfigFile(saltPassword, "SHA1");
  </code></pre>
  
  <p>But this time the hashEnterPassword is different and the login fails even for valid password. Why does the hashing generate different strings ? I started the project in 4.5 and since it said it no longer supports SHA1, I changed it to 4.0. Where am I going wrong ? Thanks in advance.</p>