PHP Class Piwik\Auth\Password

Afficher le fichier Open project: piwik/piwik Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

hash() public méthode

Hashes a password with the configured algorithm.
public hash ( string $password ) : string
$password string
Résultat string

info() public méthode

..). Can be used to verify whether a string is compatible with password_hash().
public info ( $hash ) : array
Résultat array

needsRehash() public méthode

This method expects the password to be pre-hashed by \Piwik\Plugins\UsersManager\UsersManager::getPasswordHash().
public needsRehash ( string $hash ) : boolean
$hash string
Résultat boolean

verify() public méthode

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
Résultat boolean