Lines Matching refs:algo
399 * @param string $algo The hash algorithm to be used
407 protected function stretched_hash($algo, $clear, $salt = null, $magic = 'P', $compute = 8) argument
426 $hash = hash($algo, $salt . $clear, true);
428 $hash = hash($algo, $hash . $clear, true);
576 $algo = strtolower($prefixalgo);
585 if (!in_array($algo, hash_algos())) {
586 throw new Exception("This PHP installation has no $algo support");
589 $hash = hash_pbkdf2($algo, $clear, hex2bin($salt), $iter, 0);
609 $algo = 'sha256';
611 $algo = $opts['algo'];
621 if (!in_array($algo, hash_algos())) {
622 throw new \Exception("This PHP installation has no $algo support");
625 $hash = base64_encode(hash_pbkdf2($algo, $clear, $salt, $iter, 0, true));
626 return "pbkdf2_$algo\$$iter\$$salt\$$hash";
830 * @param string $algo Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4",
837 public static function hmac($algo, $data, $key, $raw_output = false) argument
841 return hash_hmac($algo, $data, $key, $raw_output);
844 $algo = strtolower($algo);
845 $pack = 'H' . strlen($algo('test'));
851 $key = str_pad(pack($pack, $algo($key)), $size, chr(0x00));
863 $output = $algo($opad . pack($pack, $algo($ipad . $data)));