title: Hashing a string with Sha256
body: <p>I try to hash a string using SHA256, I'm using the following code:</p>
  
  <pre><code>using System;
  using System.Security.Cryptography;
  using System.Text;
   public class Hash
      {
      public static string getHashSha256(string text)
      {
          byte[] bytes = Encoding.Unicode.GetBytes(text);
          SHA256Managed hashstring = new SHA256Managed();
          byte[] hash = hashstring.ComputeHash(bytes);
          string hashString = string.Empty;
          foreach (byte x in hash)
          {
              hashString += String.Format("{0:x2}", x);
          }
          return hashString;
      }
  }
  </code></pre>
  
  <p>However, this code gives significantly different results compared to my friends php, as well as online generators (such as <a href="http://hash.online-convert.com/sha256-generator">This generator</a>)</p>
  
  <p>Does anyone know what the error is? Different bases?</p>