• I’m building a custom profile page and have everything updating the wp_users table correctly. I need to know how wordpress hashes its passwords before inserting. I tried sha1() and md5() but it doesn’t seem to match whats stored in the database. Anyone know what php functions wordpress uses to hash its passwords?

Viewing 1 replies (of 1 total)
  • Thread Starter tehjrow

    (@tehjrow)

    Nevermind, I included /var/www/wordpress/wp-includes/class-phpass.php and just used PasswordHash(). Code below for those interested.

    require('/var/www/wordpress/wp-includes/functions.php');
    require('/var/www/wordpress/wp-includes/pluggable.php');
    require('/var/www/wordpress/wp-includes/class-phpass.php');
    
    $wp_hasher = new PasswordHash(8, TRUE);
        $password = $wp_hasher->HashPassword($_POST[pass2]);
Viewing 1 replies (of 1 total)

The topic ‘how to hash password’ is closed to new replies.