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 |
string
Plaintext user's password
string
Hash of the user's password to check against.
boolean
False, if the $password does not match the hashed passwordgenerate_password(integer $length= 12
, boolean $special_chars= true
) : string
since | WP 2.5 |
---|
integer
The length of password to generate
boolean
Whether to include standard special characters
string
The 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 |
---|
integer
Lower limit for the generated number (optional, default is 0)
integer
Upper limit for the generated number (optional, default is 4294967295)
integer
A random number between min and max