CryptPassword
Joomla Platform Password Hashing Interface
deprecated
since |
3.0.1 |
---|---|
deprecated |
4.0 Use PHP 5.5's native password hashing API |
Methods
create
Creates a password hash
create(string $password, string $type = null) : string
deprecated
since |
3.0.1 |
---|---|
deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- $password
string
The password to hash.- $type
string
The type of hash. This determines the prefix of the hashing function.
Response
string
The hashed password.
getDefaultType
Gets the default type
getDefaultType() : void
deprecated
since |
3.1.4 |
---|---|
deprecated |
4.0 Use PHP 5.5's native password hashing API |
setDefaultType
Sets a default prefix
setDefaultType(string $type) : void
deprecated
since |
3.1.4 |
---|---|
deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- $type
string
The prefix to set as default
verify
Verifies a password hash
verify(string $password, string $hash) : boolean
deprecated
since |
3.0.1 |
---|---|
deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- $password
string
The password to verify.- $hash
string
The password hash to check.
Response
boolean
True if the password is valid, false otherwise.
Constants
BLOWFISH
Value | '$2y$' |
---|
Type(s)
JOOMLA
Value | 'Joomla' |
---|
Type(s)
PBKDF
Value | '$pbkdf$' |
---|
Type(s)
MD5
Value | '$1$' |
---|
Type(s)