Пример #1
0
 /**
  * @covers PasswordLib\Password\Implementation\Blowfish
  */
 public function testCreateAndVerify()
 {
     $hash = new Blowfish(array('cost' => 10));
     $test = $hash->create('Foobar');
     $this->assertTrue($hash->verify('Foobar', $test));
 }
Пример #2
0
 /**
  * @covers PasswordLib\Password\Implementation\Blowfish::verify
  * @dataProvider provideTestVerify
  * @group Vectors
  */
 public function testVerify($pass, $expect, $value)
 {
     $apr = new Blowfish();
     $this->assertEquals($value, $apr->verify($pass, $expect));
 }