Advertisements

wp_hash_password

Definition:
function wp_hash_password($password) {}

Create a hash (encrypt) of a plain text password.
For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.

Parameters

  • string $password: Plain text user password to hash

Return values

returns:The hash string of the password

Source code

function wp_hash_password($password) {

	global $wp_hasher;



	if ( empty($wp_hasher) ) {

		require_once( ABSPATH . 'wp-includes/class-phpass.php');

		// By default, use the portable hash from phpass

		$wp_hasher = new PasswordHash(8, TRUE);

	}



	return $wp_hasher->HashPassword($password);

}

3761

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: