title: Encryption in C#
body: <p>I have stumbled across the below snippet, which encrypts a user's password.  This is what i want to do because I don't want to store the user's password in the database without any encryption.</p>
  
  <p>This is working fine for what I want to achieve, but my question is this:  how can I un-encrypt it to make sure the value they have entered in the password box matches?</p>
  
  <pre><code>// Hash the password details of the user!
  private static string CreatePasswordHash(string pwd, string salt)
  {
    string saltAndPwd = string.Concat(pwd, salt);
    string hashedPwd = 
      FormsAuthentication.HashPasswordForStoringInConfigFile(saltAndPwd, "SHA1");
    hashedPwd = string.Concat(hashedPwd, salt);
    return hashedPwd;
  }
  </code></pre>
  
  <p>I call the above like this </p>
  
  <pre><code>string password = CreatePasswordHash(TxtPassword.Text, "1579");
  </code></pre>
  
  <p>The password then becomes something like this: <code>566DAB495AD0747B49865F9177E430DFAD63CA281579</code></p>
  
  <p>So how do I un-encrypt that?</p>
  
  <p>Thank you for your time.</p>