SimpleCryptPassword

Implements CryptPassword

Joomla Platform Password Crypter

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

3.0.1

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

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

Properties

cost

The cost parameter for hashing algorithms.

deprecated
since

3.0.1

deprecated

4.0 Use PHP 5.5's native password hashing API

Type(s)

int

defaultType

The default hash type

deprecated
since

3.1.4

deprecated

4.0 Use PHP 5.5's native password hashing API

Type(s)

string