See PKCS #5 v2.0 http://tools.ietf.org/html/rfc2898 for implementation details.
The implementation is tested with test vectors from http://tools.ietf.org/html/rfc6070 .
If https://wiki.php.net/rfc/hash_pbkdf2 is ever part of PHP we should check for the
existence of hash_pbkdf2() and use it if available.
public static pbkdf2 ( string $password, string $salt, integer $iterationCount, integer $derivedKeyLength, string $algorithm = 'sha256' ) : string | ||
$password | string | Input string / password |
$salt | string | The salt |
$iterationCount | integer | Hash iteration count |
$derivedKeyLength | integer | Derived key length |
$algorithm | string | Hash algorithm to use, see hash_algos(), defaults to sha256 |
Результат | string | The computed derived key as raw binary data |