PHP Class Piwik\Auth\Password

Datei anzeigen Open project: piwik/piwik Class Usage Examples

Public Methods

Method 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 method

Hashes a password with the configured algorithm.
public hash ( string $password ) : string
$password string
return string

info() public method

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

needsRehash() public method

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

verify() public method

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
return boolean