Skip to content

Commit

Permalink
needs rehash is always true
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Jul 15, 2016
1 parent 8cf1557 commit 77d1b85
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/unit/PasswordTest.php
Expand Up @@ -34,4 +34,19 @@ public function testEncrypt()
)
);
}

public function testRehash()
{
$key = new EncryptionKey(new HiddenString(\str_repeat('A', 32)));

$hash = Password::hash(new HiddenString('test password'), $key);
$this->assertTrue(\is_string($hash->getString()));

$this->assertFalse(

This comment has been minimized.

Copy link
@frederikbosch

frederikbosch Jul 15, 2016

Author Owner

Test fails: why?

Password::needsRehash(
$hash,
$key
)
);
}
}

0 comments on commit 77d1b85

Please sign in to comment.