I want to move away from using MD5 for hashing passwords in the database. The plan is to declare a custom global $wp_hasher
as hinted at in the docs for wp hash password()
:
Unless the global $wp_hasher is set, the default implementation uses PasswordHash, which adds salt to the password and hashes it with 8 passes of MD5.
I want to declare $wp_hasher
like this (Blowfish or extended DES, 16 rounds of hashing):
global $wp_hasher;
$wp_hasher = new PasswordHash(16, FALSE);
Where do I put this code so that the custom $wp_hasher
is declared by the time it's referenced in wp_hash_password()
?