From 385d41370d438f25b6cb87fc5d7de40066fc2ce0 Mon Sep 17 00:00:00 2001 From: baibaratsky Date: Sun, 12 Jun 2016 14:34:50 +0200 Subject: [PATCH] Odd-length password test --- tests/SignerTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/SignerTest.php b/tests/SignerTest.php index 61747b1..ef73b2f 100644 --- a/tests/SignerTest.php +++ b/tests/SignerTest.php @@ -120,7 +120,10 @@ public function testSignGmp($seededSignatureBC) */ public function testHalfPasswordCase($seededSignatureNormalPassword) { - $signer = new Signer(self::WMID, __DIR__ . self::KEY_FILE_NAME, self::KEY_PASSWORD . self::KEY_PASSWORD); + // A char added to check if the length of a password is odd + $doubleLengthPassword = self::KEY_PASSWORD . self::KEY_PASSWORD . '!'; + + $signer = new Signer(self::WMID, __DIR__ . self::KEY_FILE_NAME, $doubleLengthPassword); // Seed the random generator with 0 to get a predictable signature mt_srand(0);