title: generating MD5 hash of a text with C#
body: <p>I understand that System.Security.Cryptography has a MD5 hashing method in <a href="http://msdn.microsoft.com/en-us/library/tessz10c.aspx" rel="nofollow">MD5.ComputeHash</a>. However, the method takes and returns bytes. I don't understand how to work with this method using String key and hashes.  I try to work around by doing this,</p>
  
  <pre><code>var hash = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(@"text".ToCharArray()));
  foreach(byte h in hash)
  {
      Console.Write((char)h);
  }
  </code></pre>
  
  <p>However the resulting output is gibberish string. For comparison, in <a href="http://www.miraclesalad.com/webtools/md5.php" rel="nofollow">this website</a>, entering "text" will result in "1cb251ec0d568de6a929b520c4aed8d1" </p>