JCryptPasswordSimple

Implements \JCryptPassword

Joomla Platform Password Crypter

deprecated
since

12.2

deprecated

4.0 Use PHP 5.5's native password hashing API

package

Joomla.Platform

Methods

create

Creates a password hash

create(string $password, string $type = null) : mixed
deprecated
since

12.2

throws

\InvalidArgumentException

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
deprecated
since

12.3

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(integer $length) : string
deprecated
since

12.2

deprecated

4.0 Use PHP 5.5's native password hashing API

Arguments

$length

integerThe 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(integer $cost) : void
deprecated
since

12.2

deprecated

4.0 Use PHP 5.5's native password hashing API

Arguments

$cost

integerThe new cost value.

setDefaultType

Sets a default type

setDefaultType(string $type) : void
deprecated
since

12.3

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

12.2

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.

Properties

cost

The cost parameter for hashing algorithms.

deprecated

Type(s)

integer

defaultType

The default hash type

deprecated

Type(s)

string