I’ve created my own custom hashing plugin file with php code:
\`\`\`
<?php
/\*
Plugin Name: Custom Password Hash
Description: Custom password hashing implementation.
\*/
function custom\_wp\_hash\_password($password) {
// Hash the password using SHA-256 algorithm
$hashed\_password = hash(‘sha512’, trim($password));
return $hashed\_password;
}
add\_filter(‘wp\_hash\_password’, ‘custom\_wp\_hash\_password’, 10, 1);
?>
\`\`\`
​
However, when I go to my phpmyadmin local database I see the passwords being hashed at the beggining the same way they all start like: “$P$B”. How can I ensure that my SHA512 hashing method works? I tried directly adjusting the functions.php and it hashed my password like: “4f6641c5d834b765dd6687921de51ed6a210a8bf87c61767d7e1196c89ba832b” but then, I couldn’t log in at all to the website as user. It said the password was incorrect.
​
[ad_2]