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

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) : boolean
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

booleanTrue 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)