MediaWiki REL1_31
Pbkdf2PasswordTest.php
Go to the documentation of this file.
1<?php
2
11 protected function getTypeConfigs() {
12 return [ 'pbkdf2' => [
13 'class' => Pbkdf2Password::class,
14 'algo' => 'sha256',
15 'cost' => '10000',
16 'length' => '128',
17 'use-hash-extension' => true,
18 ] ];
19 }
20
21 public static function providePasswordTests() {
22 return [
23 [ true, ":pbkdf2:sha1:1:20:c2FsdA==:DGDID5YfDnHzqbUkr2ASBi/gN6Y=", 'password' ],
24 [ true, ":pbkdf2:sha1:2:20:c2FsdA==:6mwBTcctb4zNHtkqzh1B8NjeiVc=", 'password' ],
25 [ true, ":pbkdf2:sha1:4096:20:c2FsdA==:SwB5AbdlSJq+rUnZJvch0GWkKcE=", 'password' ],
26 [ true, ":pbkdf2:sha1:4096:16:c2EAbHQ=:Vvpqp1VICZ3MN9fwNCXgww==", "pass\x00word" ],
27 ];
28 }
29}
large Pbkdf2Password Password ParameterizedPassword @requires function hash_pbkdf2
static providePasswordTests()
An array of tests in the form of (bool, string, string), where the first element is whether the secon...
getTypeConfigs()
Return an array of configs to be used for this class's password type.