wp_check_password [ WordPress Function ]
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Checks the plaintext password against the encrypted Password.
Maintains compatibility between old version and the new cookie authentication protocol using PHPass library. The $hash parameter is the encrypted password and the function compares the plain text password when encrypted similarly against the already encrypted password to see if they match.
For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.
Source
<?php
function wp_check_password($password, $hash, $user_id = '') {
global $wp_hasher;
// If the hash is still md5...
if ( strlen($hash) <= 32 ) {
$check = ( $hash == md5($password) );
if ( $check && $user_id ) {
// Rehash using new hash.
wp_set_password($password, $user_id);
$hash = wp_hash_password($password);
}
return apply_filters('check_password', $check, $password, $hash, $user_id);
}
// If the stored hash is longer than an MD5, presume the
// new style phpass portable hash.
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);
}
$check = $wp_hasher->CheckPassword($password, $hash);
return apply_filters('check_password', $check, $password, $hash, $user_id);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/wp check password « WordPress Codex
Description. This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead. Checks the plaintext password ...
codex.wordpress.org - replace the wp_check_password pluggable function - WordPress
I've been scouring the internet trying to figure out exactly how to replace the wp_check_password function. Reading the comments in the pluggable.php file in ...
wordpress.org - wp_check_password (WordPress Function) - WPSeek.com
WordPress lookup for wp_check_password, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - Wordpress wp_check_password c# - Stack Overflow
Read through the wordpress code to figure out the hash algorithm they are using. Replicate that in your C# program. Then compare this hash against ...
stackoverflow.com