Neos\Flow\Tests\Unit\Security\Cryptography\Pbkdf2HashingStrategyTest::hashPasswordWithMatchingPasswordAndParametersSucceeds PHP Method

hashPasswordWithMatchingPasswordAndParametersSucceeds() public method

    public function hashPasswordWithMatchingPasswordAndParametersSucceeds()
    {
        $strategy = new Pbkdf2HashingStrategy(8, 1000, 64, 'sha256');
        $derivedKeyWithSalt = $strategy->hashPassword('password', 'MyStaticSalt');
        $this->assertTrue($strategy->validatePassword('password', $derivedKeyWithSalt, 'MyStaticSalt'));
        $this->assertFalse($strategy->validatePassword('pass', $derivedKeyWithSalt, 'MyStaticSalt'));
        $this->assertFalse($strategy->validatePassword('password', $derivedKeyWithSalt, 'SomeSalt'));
    }