title: Generating a SHA1 hash in Windows Phone outputs a different hash
body: <p>I'm currently using the built-in methods in Windows Phone and Silverlight to create a SHA1 hash of a string. This is the code:</p>
  
  <pre><code>private static string CalculateSHA1(string text)
      {
          SHA1Managed s = new SHA1Managed();
          UTF8Encoding enc = new UTF8Encoding();
          s.ComputeHash(enc.GetBytes(text.ToCharArray()));
          System.Diagnostics.Debug.WriteLine("Original Text {0}, Access {1}", text, Convert.ToBase64String(s.Hash));
          return Convert.ToBase64String(s.Hash);
      }
  </code></pre>
  
  <p>For example, I tried generating a hash for this string: "hello". </p>
  
  <p>Silverlight Output: <code>LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=</code></p>
  
  <p>Correct Output: <code>aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d</code></p>
  
  <p>What I am doing wrong in the code?</p>