Class AbstractPasswordHasher

Abstract password hashing class

Direct known subclasses

BlowfishPasswordHasher, SimplePasswordHasher
Abstract
Package: Cake\Controller\Component\Auth
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Located at Cake/Controller/Component/Auth/AbstractPasswordHasher.php

Method Detail

__constructsource public

__construct( array $config array() )

Constructor

Parameters

array $config optional array()
Array of config.

checksource 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

boolean
True if hashes match else false.

configsource public

config( array $config null )

Get/Set the config

Parameters

array $config optional null
Sets config, if null returns existing config

Returns

array
Returns configs

hashsource 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

string
Password hash

Properties summary

$_configsource

protected array

Configurations for this object. Settings passed from authenticator class to the constructor are merged with this property.

array()

© 2005–2016 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.
http://api.cakephp.org/2.7/class-AbstractPasswordHasher.html