| package | BackPress |
|---|
check_password(string $password, string $hash, $user_id = '') : boolean
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 encypted 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.
| since | WP 2.5 |
|---|---|
| global | object $wp_hasher PHPass object used for checking the password against the $hash + $password |
| uses |
stringPlaintext user's password
stringHash of the user's password to check against.
booleanFalse, if the $password does not match the hashed passwordgenerate_password(integer $length= 12, boolean $special_chars= true) : string
| since | WP 2.5 |
|---|
integerThe length of password to generate
booleanWhether to include standard special characters
stringThe random passwordhash_password(string $password) : string
rand(integer $min= 0, integer $max= 0) : integer
Not verbatim WordPress, keeps seed value in backpress options.
| since | WP 2.6.2 |
|---|
integerLower limit for the generated number (optional, default is 0)
integerUpper limit for the generated number (optional, default is 4294967295)
integerA random number between min and max