title: C# HMAC Implementation
body: <p>I want my application to encrypt a user password, and at one time password will be decrypted to be sent to the server for authentication. A friend advise me to use HMAC. I wrote the following code in C#:</p>
  
  <pre><code>System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
  byte[] key = encoding.GetBytes("secret");
  HMACSHA256 myhmacsha256 = new HMACSHA256(key);
  byte[] hashValue = myhmacsha256.ComputeHash(encoding.GetBytes("text"));
  string resultSTR = Convert.ToBase64String(hashValue);
  myhmacsha256.Clear();
  </code></pre>
  
  <p>How to decode the password (resultSTR, in this case)?</p>