Свободное общение | Help Гг
Fatal error: Call to undefined function Helpers\password_verify() in /home/usr/data/super/site.ru/app/Helpers/Password.php on line 68
Помогите найди ошибку))
Помогите найди ошибку))
<?php
namespace Helpers;
class Password
{
/**
* Hash the password using the specified algorithm.
*
* @param string $password The password to hash
* @param int $algo The algorithm to use (Defined by PASSWORD_* constants)
* @param array $options The options for the algorithm to use
*
* @return string|false The hashed password, or false on error.
*/
public static function make($password, $algo = PASSWORD_DEFAULT, array $options = array())
{
return password_hash($password, $algo, $options);
}
/**
* Get information about the password hash. Returns an array of the information
* that was used to generate the password hash.
*
* array(
* 'algo' => 1,
* 'algoName' => 'bcrypt',
* 'options' => array(
* 'cost' => 10,
* ),
* )
*
* @param string $hash The password hash to extract info from
*
* @return array The array of information about the hash.
*/
public static function getInfos($hash)
{
return password_get_info($hash);
}
/**
* Determine if the password hash needs to be rehashed according to the options provided.
*
* If the answer is true, after validating the password using password_verify, rehash it.
*
* @param string $hash The hash to test
* @param int $algo The algorithm used for new password hashes
* @param array $options The options array passed to password_hash
*
* @return bool True if the password needs to be rehashed.
*/
public static function needsRehash($hash, $algo = PASSWORD_DEFAULT, array $options = array())
{
return password_needs_rehash($hash, $algo, $options);
}
/**
* Verify a password against a hash using a timing attack resistant approach.
*
* @param string $password The password to verify
* @param string $hash The hash to verify against
*
* @return bool If the password matches the hash
*/
public static function verify($password, $hash)
{
return password_verify($password, $hash);
}
}
namespace Helpers;
class Password
{
/**
* Hash the password using the specified algorithm.
*
* @param string $password The password to hash
* @param int $algo The algorithm to use (Defined by PASSWORD_* constants)
* @param array $options The options for the algorithm to use
*
* @return string|false The hashed password, or false on error.
*/
public static function make($password, $algo = PASSWORD_DEFAULT, array $options = array())
{
return password_hash($password, $algo, $options);
}
/**
* Get information about the password hash. Returns an array of the information
* that was used to generate the password hash.
*
* array(
* 'algo' => 1,
* 'algoName' => 'bcrypt',
* 'options' => array(
* 'cost' => 10,
* ),
* )
*
* @param string $hash The password hash to extract info from
*
* @return array The array of information about the hash.
*/
public static function getInfos($hash)
{
return password_get_info($hash);
}
/**
* Determine if the password hash needs to be rehashed according to the options provided.
*
* If the answer is true, after validating the password using password_verify, rehash it.
*
* @param string $hash The hash to test
* @param int $algo The algorithm used for new password hashes
* @param array $options The options array passed to password_hash
*
* @return bool True if the password needs to be rehashed.
*/
public static function needsRehash($hash, $algo = PASSWORD_DEFAULT, array $options = array())
{
return password_needs_rehash($hash, $algo, $options);
}
/**
* Verify a password against a hash using a timing attack resistant approach.
*
* @param string $password The password to verify
* @param string $hash The hash to verify against
*
* @return bool If the password matches the hash
*/
public static function verify($password, $hash)
{
return password_verify($password, $hash);
}
}
if (password::verify($password, $this->auth->getHash($username)) == false) {
$error[] = $this->language->get('verificationError');
} это в контроллере
$error[] = $this->language->get('verificationError');
} это в контроллере
simple_php (05.01.2016 в 05:07)
Fatal error: Call to undefined function Helperspassword_verify() in /home/usr/data/super/site.ru/app/Helpers/Password.php on line 68
Помогите найди ошибку))
Fatal error: Call to undefined function Helperspassword_verify() in /home/usr/data/super/site.ru/app/Helpers/Password.php on line 68
Помогите найди ошибку))
просто лінію 68 скинь
203619150 , public static function verify($password, $hash)
{
return password_verify($password, $hash);
}
{
return password_verify($password, $hash);
}
DELETED
5 января 2016, в 17:29
Delete
shadrvlad (05.01.2016 в 17:29)
функции password_verify нету
функции password_verify нету
Класс Password функция verify
password:: verify