Ejemplo n.º 1
0
 /**
  * @covers CryptLib\Key\Derivation\PBKDF\PBKDF2::derive
  * @dataProvider provideTestDerive
  * @group Vectors
  */
 public function testDerive($p, $s, $c, $len, $hash, $expect)
 {
     $pb = new PBKDF2(array('hash' => $hash));
     $actual = $pb->derive($p, $s, $c, $len);
     $this->assertEquals($expect, strtoupper(bin2hex($actual)));
 }
Ejemplo n.º 2
0
 /**
  * @covers CryptLib\Key\Derivation\PBKDF\PBKDF2::getSignature
  */
 public function testGetSignature()
 {
     $pb = new PBKDF2(array('hash' => 'test'));
     $this->assertEquals('pbkdf2-test', $pb->getSignature());
 }