* PASSWORD_BCRYPT is used to create new password * hashes using the CRYPT_BLOWFISH algorithm. *
** This will always result in a hash using the "$2y$" crypt format, * which is always 60 characters wide. *
** Supported Options: *
** salt - to manually provide a salt to use when hashing the password. * Note that this will override and prevent a salt from being automatically generated. *
** If omitted, a random salt will be generated by {@link "https://secure.php.net/manual/en/function.password-hash.php" password_hash()} for * each password hashed. This is the intended mode of operation. *
** cost - which denotes the algorithmic cost that should be used. * Examples of these values can be found on the {@link "https://secure.php.net/manual/en/function.crypt.php crypt()"} page. *
** If omitted, a default value of 10 will be used. This is a good * baseline cost, but you may want to consider increasing it depending on your hardware. *
** The default cost used for the BCRYPT hashing algorithm. *
** Values for this constant: *
** The default algorithm to use for hashing if no algorithm is provided. * This may change in newer PHP releases when newer, stronger hashing * algorithms are supported. *
** It is worth noting that over time this constant can (and likely will) * change. Therefore you should be aware that the length of the resulting * hash can change. Therefore, if you use PASSWORD_DEFAULT * you should store the resulting hash in a way that can store more than 60 * characters (255 is the recommended width). *
** Values for this constant: *
*An associative array containing options. See the password algorithm constants for documentation on the supported options for each algorithm.
* If omitted, a random salt will be created and the default cost will be used. * Warning ** The salt option has been deprecated as of PHP 7.0.0. It is now * preferred to simply use the salt that is generated by default. *
* @return string|false|null Returns the hashed password, or FALSE on failure, or null if the algorithm is invalid * @since 5.5 */ #[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false|null")] function password_hash(string $password, string|int|null $algo, array $options = []) {} /** * Checks if the given hash matches the given options. * @link https://secure.php.net/manual/en/function.password-needs-rehash.php * @param string $hash A hash created by password_hash(). * @param string|int|null $algo A password algorithm constant denoting the algorithm to use when hashing the password. * @param array $options [optional]An associative array containing options. See the password algorithm constants for documentation on the supported options for each algorithm.
* @return bool Returns TRUE if the hash should be rehashed to match the given algo and options, or FALSE otherwise. * @since 5.5 */ function password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool {} /** * Checks if the given hash matches the given options. * @link https://secure.php.net/manual/en/function.password-verify.php * @param string $password The user's password. * @param string $hash A hash created by password_hash(). * @return bool Returns TRUE if the password and hash match, or FALSE otherwise. * @since 5.5 */ function password_verify(string $password, string $hash): bool {} /** * Return a complete list of all registered password hashing algorithms. * @return string[] * @since 7.4 */ function password_algos(): array {} // End of password v.