4 * @covers LayeredParameterizedPassword
7 class LayeredParameterizedPasswordTest
extends PasswordTestCase
{
8 protected function getTypeConfigs() {
10 'testLargeLayeredTop' => [
11 'class' => 'LayeredParameterizedPassword',
13 'testLargeLayeredBottom',
14 'testLargeLayeredBottom',
15 'testLargeLayeredBottom',
16 'testLargeLayeredBottom',
17 'testLargeLayeredFinal',
20 'testLargeLayeredBottom' => [
21 'class' => 'Pbkdf2Password',
26 'testLargeLayeredFinal' => [
27 'class' => 'BcryptPassword',
33 protected function getValidTypes() {
34 return [ 'testLargeLayeredFinal' ];
37 public static function providePasswordTests() {
38 // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
42 ':testLargeLayeredTop:sha512:1024:512!sha512:1024:512!sha512:1024:512!sha512:1024:512!5!vnRy+2SrSA0fHt3dwhTP5g==!AVnwfZsAQjn+gULv7FSGjA==!xvHUX3WcpkeSn1lvjWcvBg==!It+OC/N9tu+d3ByHhuB0BQ==!Tb.gqUOiD.aWktVwHM.Q/O!7CcyMfXUPky5ptyATJsR2nq3vUqtnBC',
46 // @codingStandardsIgnoreEnd
50 * @covers LayeredParameterizedPassword::partialCrypt
52 public function testLargeLayeredPartialUpdate() {
53 /** @var ParameterizedPassword $partialPassword */
54 $partialPassword = $this->passwordFactory
->newFromType( 'testLargeLayeredBottom' );
55 $partialPassword->crypt( 'testPassword123' );
57 /** @var LayeredParameterizedPassword $totalPassword */
58 $totalPassword = $this->passwordFactory
->newFromType( 'testLargeLayeredTop' );
59 $totalPassword->partialCrypt( $partialPassword );
61 $this->assertTrue( $totalPassword->equals( 'testPassword123' ) );