PHP Класс Piwik\Auth\Password

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
hash ( string $password ) : string Hashes a password with the configured algorithm.
info ( $hash ) : array Returns information about a hashed password (algo, options, .
needsRehash ( string $hash ) : boolean Rehashes a user's password if necessary.
verify ( string $password, string $hash ) : boolean Verifies a user's password against the provided hash.

Описание методов

hash() публичный Метод

Hashes a password with the configured algorithm.
public hash ( string $password ) : string
$password string
Результат string

info() публичный Метод

..). Can be used to verify whether a string is compatible with password_hash().
public info ( $hash ) : array
Результат array

needsRehash() публичный Метод

This method expects the password to be pre-hashed by \Piwik\Plugins\UsersManager\UsersManager::getPasswordHash().
public needsRehash ( string $hash ) : boolean
$hash string
Результат boolean

verify() публичный Метод

This method expects the password to be pre-hashed by \Piwik\Plugins\UsersManager\UsersManager::getPasswordHash().
public verify ( string $password, string $hash ) : boolean
$password string
$hash string
Результат boolean