Class AbstractPasswordHasher

Abstract password hashing class

Direct Subclasses

Abstract
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 protected
    array

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

Method Summary

  • __construct() public
    Constructor
  • check() abstract public

    Check hash. Generate hash from user provided password string or data array and check against existing hash.

  • config() public
    Get/Set the config
  • hash() abstract public
    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

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

array
Returns 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

string
Password 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