PasswordHasherInterface
in
Provides password hashing capabilities.
Tags
Table of Contents
Constants
- MAX_PASSWORD_LENGTH = 4096
Methods
- hash() : string
- Hashes a plain password.
- needsRehash() : bool
- Checks if a password hash would benefit from rehashing.
- verify() : bool
- Verifies a plain password against a hash.
Constants
MAX_PASSWORD_LENGTH
public
mixed
MAX_PASSWORD_LENGTH
= 4096
Methods
hash()
Hashes a plain password.
public
hash(string $plainPassword) : string
Parameters
- $plainPassword : string
Tags
Return values
stringneedsRehash()
Checks if a password hash would benefit from rehashing.
public
needsRehash(string $hashedPassword) : bool
Parameters
- $hashedPassword : string
Return values
boolverify()
Verifies a plain password against a hash.
public
verify(string $hashedPassword, string $plainPassword) : bool
Parameters
- $hashedPassword : string
- $plainPassword : string