Skip to content

Commit

Permalink
Odd-length password test
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaratsky committed Jun 12, 2016
1 parent 915a7e0 commit 385d413
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/SignerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 385d413

Please sign in to comment.