title: Check password stored with PBKDF2 with php
body: <p>I have a big problem, I have to write a php login page using an db where password are stored as PBKDF2 (with another perl script). When I get the password with a query I read this:
  sha256:1000:2SeBDP88w4bqKbJaCJNpNuRHQhUM96X1:jgh/SZtmRWH5iDIwtXyFLtuuDf7YE+7HQEJZ4KFFNAg= (I know this password but I cannot regenerate it in php).</p>
  
  <p>I tried with this script (get from php.net):</p>
  
  <pre><code>$password = "qqqqq";
  $iterations = 1000;
  $salt = "2SeBDP88w4bqKbJaCJNpNuRHQhUM96X1";
  $hash = hash_pbkdf2("sha256", $password, $salt, $iterations, 20);
  echo $hash   // result a2ba3349194c38f828af
  </code></pre>
  
  <p>but the pass generate is a2ba3349194c38f828af and not jgh/SZtmRWH5iDIwtXyFLtuuDf7YE+7HQEJZ4KFFNAg=</p>
  
  <p>who wrote the perl script that store these password told me "The passwords are getting encoded though one-way hashing scheme named 'PBKDF2'"</p>
  
  <p>Some ideas? Someone know where I'm wrong? </p>