title: Hashing and GetString/GetBytes issue
body: <p>I have the below code to hash/store/retrieve data for passwords but my first unit test and it fails.</p>
  
  <p>I beleive its the Encoding causing the problem because when GetBytes is called it returns <code>byte[38]</code>, <code>byte[36]</code> when it should be 20 I think.</p>
  
  <p>I have to convert to string as I'm storing it in a database.</p>
  
  <p>Any ideas? Thanks</p>
  
  <pre><code>[Fact]
  public void EncryptDecryptPasswordShouldMatch()
  {
      string password = "password";
      string passwordKey = string.Empty;
      string passwordSalt = string.Empty;
  
      Helpers.CreatePasswordHash(password, out passwordSalt, out passwordKey);
  
      Assert.True(Helpers.PasswordsMatch(passwordSalt, passwordKey, password));
  
  }
  
  
  public static bool PasswordsMatch(string passwordSalt, string passwordKey, string password)
  {
      byte[] salt = Encoding.UTF8.GetBytes(passwordSalt);
      byte[] key = Encoding.UTF8.GetBytes(passwordKey);
  
      using (var deriveBytes = new Rfc2898DeriveBytes(password, salt))
      {
          byte[] newKey = deriveBytes.GetBytes(20);  // derive a 20-byte key
  
          if (!newKey.SequenceEqual(key))
              return false;
      }
  
      return true;
  }
  
  public static void CreatePasswordHash(string password, out string passwordSalt, out string passwordKey)
  {
      // specify that we want to randomly generate a 20-byte salt
      using (var deriveBytes = new Rfc2898DeriveBytes(password, 20))
      {
          byte[] salt = deriveBytes.Salt;
          byte[] key = deriveBytes.GetBytes(20);  // derive a 20-byte key
  
          passwordSalt = Encoding.UTF8.GetString(salt);
          passwordKey = Encoding.UTF8.GetString(key);
      }
  }
  </code></pre>