title: C# - MD5 hash not matching expected value
body: <p>I am trying to generate a MD5 hash in C#, but I cannot retrieve the string that I am expecting.</p>
  
  <p>Using an <a href="http://www.miraclesalad.com/webtools/md5.php" rel="nofollow">MD5 Hash Generator</a>, the string <code>Hello World!</code> returns a hash of <code>ed076287532e86365e841e92bfc50d8c</code>.</p>
  
  <p>Using this code:</p>
  
  <pre><code>string hash;
  using (MD5 md5 = MD5.Create())
  {
      hash = Encoding.UTF8.GetString(md5.ComputeHash(Encoding.Default.GetBytes("Hello World!")));
  }
  </code></pre>
  
  <p>returns <code>�\ab�S.�6^����\r�</code> which is problematic.</p>
  
  <p>I suspect this is an issue to do with my encoding of the string. How can I retrieve the expected value?</p>
  
  <p><strong>Edit</strong>: As you can see, I do not have much (any) experience with using the MD5 hash - the aim of this question is to educate myself, rather than use the code to secure information.</p>