wiki.techinc.nl/tests/phpunit/includes/password/Pbkdf2PasswordFallbackTest.php
Max Semenik 9c4ce7e1cf PasswordPbkdf2: remove the 'use-hash-extension' option
It's misleading because even with this option the Hash extension is
still required due to usage of hash_hmac(), it's just to allow this
class to work on pre-5.5 PHP that had hash_hmac() but not hash_pbkdf().
Since we require 7.0, this option doesn't do anything anymore.

Change-Id: Ib60ab9377b44d78b7147c6139b07dc5467da007c
2018-11-30 18:21:03 -08:00

28 lines
720 B
PHP

<?php
/**
* @group large
* @covers Pbkdf2Password
*/
class Pbkdf2PasswordFallbackTest extends PasswordTestCase {
protected function getTypeConfigs() {
return [
'pbkdf2' => [
'class' => Pbkdf2Password::class,
'algo' => 'sha256',
'cost' => '10000',
'length' => '128',
],
];
}
public static function providePasswordTests() {
return [
[ true, ":pbkdf2:sha1:1:20:c2FsdA==:DGDID5YfDnHzqbUkr2ASBi/gN6Y=", 'password' ],
[ true, ":pbkdf2:sha1:2:20:c2FsdA==:6mwBTcctb4zNHtkqzh1B8NjeiVc=", 'password' ],
[ true, ":pbkdf2:sha1:4096:20:c2FsdA==:SwB5AbdlSJq+rUnZJvch0GWkKcE=", 'password' ],
[ true, ":pbkdf2:sha1:4096:16:c2EAbHQ=:Vvpqp1VICZ3MN9fwNCXgww==", "pass\x00word" ],
];
}
}