| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testArgon2Hashing() |
||
| 11 | { |
||
| 12 | if (! defined('PASSWORD_ARGON2I')) { |
||
| 13 | $this->markTestSkipped('PHP not compiled with argon2 hashing support.'); |
||
| 14 | } |
||
| 15 | |||
| 16 | $hasher = new Argon2Hasher(); |
||
| 17 | |||
| 18 | $value = $hasher->make('password'); |
||
| 19 | $this->assertNotSame('password', $value); |
||
| 20 | $this->assertTrue($hasher->check('password', $value)); |
||
| 21 | $this->assertFalse($hasher->needsRehash($value)); |
||
| 22 | $this->assertTrue($hasher->needsRehash($value, ['threads' => 1])); |
||
| 23 | } |
||
| 25 |