Password
- Full name:
\Codefy\Framework\Support\Password
- This class is marked as final and can't be subclassed
- This class is a Final class
Methods
algorithm
Algorithm to use when hashing the password (i.e. PASSWORD_DEFAULT, PASSWORD_ARGON2ID).
- This method is static.
Return Value:
Password algorithm.
Throws:
options
An associative array containing options.
- This method is static.
Return Value:
Array of options.
Throws:
hash
Hashes a plain text password.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$password | string | Plain text password |
Return Value:
Hashed password.
Throws:
verify
Checks if the given hash matches the given options.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$password | string | |
$hash | string |
needsRehash
Checks if the given hash matches the given algorithm and options provider.
If not, it is assumed that the hash needs to be rehashed.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$hash | string |
Throws:
algos
Get available password hashing algorithm IDs.
- This method is static.
getInfo
Returns information about the given hash.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$password | string |
Automatically generated on 2025-10-13