Filters the hashing algorithm to use in the password_hash() and password_needs_rehash() functions.
Description
The default is the value of the PASSWORD_BCRYPT constant which means bcrypt is used. <strong>Important:</strong> The only password hashing algorithm that is guaranteed to be available across PHP installations is bcrypt. If you use any other algorithm you must make sure that it is available on the server. The password_algos() function can be used to check which hashing algorithms are available. The hashing options can be controlled via the 'wp_hash_password_options' filter. Other available constants include: <ul> <li>PASSWORD_ARGON2I</li> <li>PASSWORD_ARGON2ID</li> <li>PASSWORD_DEFAULT</li> </ul>
Parameters
$algorithmstring
The hashing algorithm. Default is the value of the PASSWORD_BCRYPT constant.
2779*2780* @since 6.8.02781* @since 7.0.0 The `$algorithm` parameter is now always a string.2782*2783* @param string$algorithm The hashing algorithm.Default is the value of the `PASSWORD_BCRYPT` constant.2784*/2785$algorithm=apply_filters('wp_hash_password_algorithm',PASSWORD_BCRYPT);27862787/**2788* Filters the options passed to the password_hash()andpassword_needs_rehash() functions.2789*2790* The default hashing algorithm is bcrypt, but this can be changed via the {@see 'wp_hash_password_algorithm'}2791* filter. You must ensure that the options are appropriate for the algorithm in use.
History
Introduced in 6.8.0. 2 changes between 6.8.8 and 7.1.0.