CryptPassword

Joomla Platform Password Hashing Interface

deprecated
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) : string
deprecated
since

3.0.1

deprecated

4.0 Use PHP 5.5's native password hashing API

Arguments

password

stringThe password to hash.

type

stringThe type of hash. This determines the prefix of the hashing function.

Response

stringThe 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

stringThe prefix to set as default

verify

Verifies a password hash

verify(string password, string hash) : bool
deprecated
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.

Constants

BLOWFISH

Value '$2y$'

JOOMLA

Value 'Joomla'

PBKDF

Value '$pbkdf$'

MD5

Value '$1$'