CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.4 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.4
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • AbstractPasswordHasher
  • ActionsAuthorize
  • BaseAuthenticate
  • BaseAuthorize
  • BasicAuthenticate
  • BlowfishAuthenticate
  • BlowfishPasswordHasher
  • ControllerAuthorize
  • CrudAuthorize
  • DigestAuthenticate
  • FormAuthenticate
  • SimplePasswordHasher
 1: <?php
 2: /**
 3:  *
 4:  *
 5:  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 6:  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 7:  *
 8:  * Licensed under The MIT License
 9:  * For full copyright and license information, please see the LICENSE.txt
10:  * Redistributions of files must retain the above copyright notice.
11:  *
12:  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13:  * @link          http://cakephp.org CakePHP(tm) Project
14:  * @since         CakePHP(tm) v 2.4.0
15:  * @license       http://www.opensource.org/licenses/mit-license.php MIT License
16:  */
17: 
18: /**
19:  * Abstract password hashing class
20:  *
21:  * @package       Cake.Controller.Component.Auth
22:  */
23: abstract class AbstractPasswordHasher {
24: 
25: /**
26:  * Configurations for this object. Settings passed from authenticator class to
27:  * the constructor are merged with this property.
28:  *
29:  * @var array
30:  */
31:     protected $_config = array();
32: 
33: /**
34:  * Constructor
35:  *
36:  * @param array $config Array of config.
37:  */
38:     public function __construct($config = array()) {
39:         $this->config($config);
40:     }
41: 
42: /**
43:  * Get/Set the config
44:  *
45:  * @param array $config Sets config, if null returns existing config
46:  * @return array Returns configs
47:  */
48:     public function config($config = null) {
49:         if (is_array($config)) {
50:             $this->_config = array_merge($this->_config, $config);
51:         }
52:         return $this->_config;
53:     }
54: 
55: /**
56:  * Generates password hash.
57:  *
58:  * @param string|array $password Plain text password to hash or array of data
59:  *   required to generate password hash.
60:  * @return string Password hash
61:  */
62:     abstract public function hash($password);
63: 
64: /**
65:  * Check hash. Generate hash from user provided password string or data array
66:  * and check against existing hash.
67:  *
68:  * @param string|array $password Plain text password to hash or data array.
69:  * @param string Existing hashed password.
70:  * @return boolean True if hashes match else false.
71:  */
72:     abstract public function check($password, $hashedPassword);
73: 
74: }
75: 
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs