Class AbstractPasswordHasher
Abstract password hashing class
Direct Subclasses
Package: Cake\Controller\Component\Auth
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Controller/Component/Auth/AbstractPasswordHasher.php
Properties summary
-
$_config
protectedarray
Configurations for this object. Settings passed from authenticator class to the constructor are merged with this property.
Method Summary
- __construct() publicConstructor
-
Check hash. Generate hash from user provided password string or data array and check against existing hash.
- config() publicGet/Set the config
- Generates password hash.
Method Detail
__construct()source public
__construct( array $config array() )
Constructor
Parameters
- array
$config
optional array() - Array of config.
check()source abstract public
check( string|array $password , string $hashedPassword )
Check hash. Generate hash from user provided password string or data array and check against existing hash.
Parameters
- string|array
$password
- Plain text password to hash or data array.
- string
$hashedPassword
- Existing hashed password.
Returns
booleanTrue if hashes match else false.
config()source public
config( array $config null )
Get/Set the config
Parameters
- array
$config
optional null - Sets config, if null returns existing config
Returns
arrayReturns configs
hash()source abstract public
hash( string|array $password )
Generates password hash.
Parameters
- string|array
$password
Plain text password to hash or array of data required to generate password hash.
Returns
stringPassword hash
Properties detail
$_configsource
protected array
Configurations for this object. Settings passed from authenticator class to the constructor are merged with this property.
array()
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.10/class-AbstractPasswordHasher.html