From 0e74f73af5da5cee2cb3c728d175f92a3ba14cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Thu, 24 May 2018 23:41:30 +0200 Subject: [PATCH] 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 ``` --- .../Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php b/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php index cdb4f8767a..1b033cfacc 100644 --- a/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php @@ -30,7 +30,7 @@ class Argon2iPasswordEncoderTest extends TestCase public function testValidationWithConfig() { - $encoder = new Argon2iPasswordEncoder(4, 4, 1); + $encoder = new Argon2iPasswordEncoder(8, 4, 1); $result = $encoder->encodePassword(self::PASSWORD, null); $this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null)); $this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null));