Function __global->password_needs_rehash
Definitions
sources_custom/phpstub.php
- Checks if the given hash matches the given options.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $hash | string | No | No | required parameter | N/A | N/A | The password hash |
| $algo | integer | No | No | required parameter | N/A | N/A | The algorithm wanted (Defined by PASSWORD_* constants) |
| $options | ?array | No | No | Null | N/A | N/A | The options for the algorithm wanted (null: no options) |
Returns
- Whether rehash is needed
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Checks if the given hash matches the given options.
*
* @param string $hash The password hash
* @param integer $algo The algorithm wanted (Defined by PASSWORD_* constants)
* @param ?array $options The options for the algorithm wanted (null: no options)
* @return boolean Whether rehash is needed
*/
function password_needs_rehash(string $hash, int $algo, ?array $options = null) : bool
* Checks if the given hash matches the given options.
*
* @param string $hash The password hash
* @param integer $algo The algorithm wanted (Defined by PASSWORD_* constants)
* @param ?array $options The options for the algorithm wanted (null: no options)
* @return boolean Whether rehash is needed
*/
function password_needs_rehash(string $hash, int $algo, ?array $options = null) : bool

