Tweak Argon2 test config
Memory cost 8 seems to be lowest value accepted on my machine ``` Testing Symfony\Component\Security\Core\Tests\Encoder\Argon2iPasswordEncoderTest E.... 5 / 5 (100%) Time: 114 ms, Memory: 4.00MB There was 1 error: 1) Symfony\Component\Security\Core\Tests\Encoder\Argon2iPasswordEncoderTest::testValidationWithConfig password_hash(): Memory cost is outside of allowed memory range /home/gadelat/PhpstormProjects/symfony/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php:105 /home/gadelat/PhpstormProjects/symfony/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php:67 /home/gadelat/PhpstormProjects/symfony/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php:34 ```
This commit is contained in:
parent
755815993d
commit
0e74f73af5
@ -30,7 +30,7 @@ class Argon2iPasswordEncoderTest extends TestCase
|
|||||||
|
|
||||||
public function testValidationWithConfig()
|
public function testValidationWithConfig()
|
||||||
{
|
{
|
||||||
$encoder = new Argon2iPasswordEncoder(4, 4, 1);
|
$encoder = new Argon2iPasswordEncoder(8, 4, 1);
|
||||||
$result = $encoder->encodePassword(self::PASSWORD, null);
|
$result = $encoder->encodePassword(self::PASSWORD, null);
|
||||||
$this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null));
|
$this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null));
|
||||||
$this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null));
|
$this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null));
|
||||||
|
Reference in New Issue
Block a user