/** * @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))); }
/** * @covers CryptLib\Key\Derivation\PBKDF\PBKDF2::getSignature */ public function testGetSignature() { $pb = new PBKDF2(array('hash' => 'test')); $this->assertEquals('pbkdf2-test', $pb->getSignature()); }