3 class LayeredParameterizedPasswordTest
extends PasswordTestCase
{
4 protected function getTypeConfigs() {
6 'testLargeLayeredTop' => array(
7 'class' => 'LayeredParameterizedPassword',
9 'testLargeLayeredBottom',
10 'testLargeLayeredBottom',
11 'testLargeLayeredBottom',
12 'testLargeLayeredBottom',
13 'testLargeLayeredFinal',
16 'testLargeLayeredBottom' => array(
17 'class' => 'Pbkdf2Password',
22 'testLargeLayeredFinal' => array(
23 'class' => 'BcryptPassword',
29 public static function providePasswordTests() {
30 /** @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong */
32 array( true, ':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', 'testPassword123' ),
34 /** @codingStandardsIgnoreEnd */
38 * @covers LayeredParameterizedPassword::partialCrypt
40 public function testLargeLayeredPartialUpdate() {
41 /** @var ParameterizedPassword $partialPassword */
42 $partialPassword = $this->passwordFactory
->newFromType( 'testLargeLayeredBottom' );
43 $partialPassword->crypt( 'testPassword123' );
45 /** @var LayeredParameterizedPassword $totalPassword */
46 $totalPassword = $this->passwordFactory
->newFromType( 'testLargeLayeredTop' );
47 $totalPassword->partialCrypt( $partialPassword );
49 $this->assertTrue( $totalPassword->equals( 'testPassword123' ) );