Class Passwords
Passwords tools. Requires PHP >= 5.3.7.
Methods summary
public static
string
|
#
hash( string $password, array $options = NULL )
Computes salted password hash.
Computes salted password hash.
Parameters
- $password
string
- $options
array with cost (4-31), salt (22 chars)
Returns
string 60 chars long
|
public static
boolean
|
#
verify( $password, $hash )
Verifies that a password matches a hash.
Verifies that a password matches a hash.
Returns
boolean
|
public static
boolean
|
#
needsRehash( string $hash, array $options = NULL )
Checks if the given hash matches the options.
Checks if the given hash matches the options.
Parameters
- $hash
string
- $options
array with cost (4-31)
Returns
boolean
|