WP_Application_Passwords::hash_password
Hashes a plaintext application password.
Method of the class: WP_Application_Passwords{}
No Hooks.
Returns
String. Hashed password.
Usage
$result = WP_Application_Passwords::hash_password( string $password ): string;
- string $password(required)
.
It has the attribute #[\SensitiveParameter], which hides the value of the parameter from logs. It is used to protect sensitive data (for example, passwords). Documentation.
Changelog
| Since 6.8.0 | Introduced. |
WP_Application_Passwords::hash_password() WP Application Passwords::hash password code WP 6.9.1
public static function hash_password(
#[\SensitiveParameter]
string $password
): string {
return wp_fast_hash( $password );
}