5 * @covers Pbkdf2Password
7 * @covers ParameterizedPassword
9 class Pbkdf2PasswordTest
extends PasswordTestCase
{
10 public function setUp() {
12 // Can't be done with annotations due to
13 // https://github.com/sebastianbergmann/phpunit/issues/3459
14 if ( !function_exists( 'hash_pbkdf2' ) ) {
15 $this->markTestSkipped( 'function hash_pbkdf2 is required' );
19 protected function getTypeConfigs() {
20 return [ 'pbkdf2' => [
21 'class' => Pbkdf2Password
::class,
28 public static function providePasswordTests() {
30 [ true, ":pbkdf2:sha1:1:20:c2FsdA==:DGDID5YfDnHzqbUkr2ASBi/gN6Y=", 'password' ],
31 [ true, ":pbkdf2:sha1:2:20:c2FsdA==:6mwBTcctb4zNHtkqzh1B8NjeiVc=", 'password' ],
32 [ true, ":pbkdf2:sha1:4096:20:c2FsdA==:SwB5AbdlSJq+rUnZJvch0GWkKcE=", 'password' ],
33 [ true, ":pbkdf2:sha1:4096:16:c2EAbHQ=:Vvpqp1VICZ3MN9fwNCXgww==", "pass\x00word" ],