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
    • IRC
    • Slack
    • Paid Support
CakePHP

C Authentication 2.x API

  • Project:
    • Authentication
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 2.x
      • 3.x
      • 2.x

Namespaces

  • Authentication
    • Authenticator
    • Controller
    • Identifier
    • Middleware
    • PasswordHasher
    • UrlChecker
    • View

Interface PasswordHasherInterface

PasswordHasherInterface

Namespace: Authentication\PasswordHasher

Method Summary

  • check() public

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

  • hash() public

    Generates password hash.

  • needsRehash() public

    Returns true if the password need to be rehashed, due to the password being created with anything else than the passwords generated by this class.

Method Detail

check() ¶ public

check(string|array $password, string $hashedPassword): bool

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
bool

hash() ¶ public

hash(string|array $password): string

Generates password hash.

Parameters
string|array $password

Plain text password to hash or array of data required to generate password hash.

Returns
string

needsRehash() ¶ public

needsRehash(string $password): bool

Returns true if the password need to be rehashed, due to the password being created with anything else than the passwords generated by this class.

Returns true by default since the only implementation users should rely on is the one provided by default in php 5.5+ or any compatible library

Parameters
string $password

The password to verify

Returns
bool
OpenHub
Pingping
Linode
  • 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
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs