/** * @dataProvider rfc6070vectors * @test */ public function testHashPbkdf2Function(array $vector) { $this->assertEquals($vector['result'], \Rych\hash_pbkdf2($vector['algo'], $vector['password'], $vector['salt'], $vector['iterations'], $vector['length'], false)); $this->assertEquals($vector['raw_result'], \bin2hex(\Rych\hash_pbkdf2($vector['algo'], $vector['password'], $vector['salt'], $vector['iterations'], $vector['length'], true))); }
function hash_pbkdf2($algo, $password, $salt, $iterations, $length = 0, $raw_output = false) { return \Rych\hash_pbkdf2($algo, $password, $salt, $iterations, $length, $raw_output); }