SimpleCryptPassword
Implements CryptPasswordJoomla Platform Password Crypter
| since |
3.0.1 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
| package |
Joomla CMS |
Methods
create
Creates a password hash
create(string password, string type = null) : mixed
| since |
3.0.1 |
|---|---|
| throws |
|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- password
stringThe password to hash.- type
stringThe hash type.
Response
mixedThe hashed password or false if the password is too long.
getDefaultType
Gets the default type
getDefaultType() : string
| since |
3.1.4 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Response
string$type The default type
getSalt
Generates a salt of specified length. The salt consists of characters in the set [./0-9A-Za-z].
getSalt(int length) : string
| since |
3.0.1 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- length
intThe number of characters to return.
Response
stringThe string of random characters.
setCost
Sets the cost parameter for the generated hash for algorithms that use a cost factor.
setCost(int cost) : void
| since |
3.0.1 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- cost
intThe new cost value.
setDefaultType
Sets a default type
setDefaultType(string type) : void
| since |
3.1.4 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- type
stringThe value to set as default.
verify
Verifies a password hash
verify(string password, string hash) : bool
| since |
3.0.1 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Arguments
- password
stringThe password to verify.- hash
stringThe password hash to check.
Response
boolTrue if the password is valid, false otherwise.
Properties
cost
The cost parameter for hashing algorithms.
| since |
3.0.1 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Type(s)
int
defaultType
The default hash type
| since |
3.1.4 |
|---|---|
| deprecated |
4.0 Use PHP 5.5's native password hashing API |
Type(s)
string