Example #1
0
 public function testMethod_check_salted_hash()
 {
     // md5('admin'); from form input
     $passwordhash = '21232f297a57a5a743894a0e4a801fc3';
     // expected, from db
     $databasehash = '7ff3adfa18a8ad7f115e90ce2c44a0ec';
     // from db
     $salt = 'Sko5ie';
     $hash_algorithm = 'md5';
     $bool = \Koch\Security\Security::check_salted_hash($passwordhash, $databasehash, $salt, $hash_algorithm);
     $this->assertTrue($bool, true);
 }