* 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: *

* * @link https://secure.php.net/manual/en/password.constants.php */ use JetBrains\PhpStorm\ArrayShape; use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware; define("PASSWORD_DEFAULT", "2y"); /** *

* The default cost used for the BCRYPT hashing algorithm. *

*

* Values for this constant: *

* */ define("PASSWORD_BCRYPT_DEFAULT_COST", 10); /** *

* 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: *

* */ define("PASSWORD_BCRYPT", '2y'); /** * PASSWORD_ARGON2I is used to create new password hashes using the Argon2i algorithm. * * Supported Options: * * Available as of PHP 7.2.0. * @since 7.2 */ define('PASSWORD_ARGON2I', 'argon2i'); /** * PASSWORD_ARGON2ID is used to create new password hashes using the Argon2id algorithm. * * Supported Options: * * Available as of PHP 7.3.0. * @since 7.3 */ define('PASSWORD_ARGON2ID', 'argon2id'); /** * Default amount of memory in bytes that Argon2lib will use while trying to compute a hash. * Available as of PHP 7.2.0. * @since 7.2 */ define('PASSWORD_ARGON2_DEFAULT_MEMORY_COST', 65536); /** * Default amount of time that Argon2lib will spend trying to compute a hash. * Available as of PHP 7.2.0. * @since 7.2 */ define('PASSWORD_ARGON2_DEFAULT_TIME_COST', 4); /** * Default number of threads that Argon2lib will use. * Available as of PHP 7.2.0. * @since 7.2 */ define('PASSWORD_ARGON2_DEFAULT_THREADS', 1); /** * @since 7.4 */ define('PASSWORD_ARGON2_PROVIDER', 'standard'); /** * Returns information about the given hash * @link https://secure.php.net/manual/en/function.password-get-info.php * @param string $hash A hash created by password_hash(). * @return array|null Returns an associative array with three elements: * * @since 5.5 */ #[ArrayShape(["algo" => "int", "algoName" => "string", "options" => "array"])] #[LanguageLevelTypeAware(['8.0' => 'array'], default: '?array')] function password_get_info(string $hash) {} /** * (PHP 5 >= 5.5.0, PHP 5)
* * Creates a password hash. * @link https://secure.php.net/manual/en/function.password-hash.php * @param string $password The user's password. * @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.

* 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.