title: Why do PasswordDeriveBytes and Rfc2898DeriveBytes produce different results?
body: <p>I used to have the following code to get my password derivatives using SHA1:</p>
  
  <pre><code>string passPhrase = "Pas5pr@se";        
  string saltValue = "s@1tValue";        
  string hashAlgorithm = "SHA1";             
  int passwordIterations = 2;      
  
  PasswordDeriveBytes password = 
      new PasswordDeriveBytes (passPhrase, saltValueBytes, hashAlgorithm, passwordIterations);
  </code></pre>
  
  <p>Then I get the bytes by doing:</p>
  
  <pre><code>var bytes = password.GetByes(32);
  </code></pre>
  
  <p>I saw that I should use Rfc2898DeriveBytes instead. So I now replace it with:</p>
  
  <pre><code>Rfc2898DeriveBytes password1 = new Rfc2898DeriveBytes(passPhrase, saltValueBytes, passwordIterations);
  </code></pre>
  
  <p>But when I do:</p>
  
  <pre><code> var bytes = password.GetBytes(32);
  </code></pre>
  
  <p>I don't get the same values. Any clue?</p>