wp_hash_password( string $password )
Creates a hash (encrypt) of a plain text password using PHP’s PASSWORD_DEFAULT hashing algorithm.
Description
For integration with other applications, this function can be overwritten to instead use another package password checking algorithm.
Parameters
- $password
-
(Required) Plaintext password
Return
(string) The hash string of the password.
Source
File: wp-includes/pluggable.php
function wp_hash_password($password) {
global $wp_hasher;
if ( empty($wp_hasher) ) {
require_once( ABSPATH . WPINC . '/class-phpass.php');
// By default, use the portable hash from phpass
$wp_hasher = new PasswordHash(8, true);
}
return $wp_hasher->HashPassword( trim( $password ) );
}
Changelog
Version | Description |
---|---|
CP-2.2.0 | Introduced. CP-2.2.0 |