interface CryptPassword

Joomla Platform Password Hashing Interface

Constants

BLOWFISH

JOOMLA

PBKDF

MD5

Methods

string
create( string $password, string $type = null)

Creates a password hash

boolean
verify( string $password, string $hash)

Verifies a password hash

void
setDefaultType( string $type)

Sets a default prefix

void
getDefaultType()

Gets the default type

Details

string create( string $password, string $type = null)

Creates a password hash

Parameters

string $password The password to hash.
string $type The type of hash. This determines the prefix of the hashing function.

Return Value

string The hashed password.

boolean verify( string $password, string $hash)

Verifies a password hash

Parameters

string $password The password to verify.
string $hash The password hash to check.

Return Value

boolean True if the password is valid, false otherwise.

void setDefaultType( string $type)

Sets a default prefix

Parameters

string $type The prefix to set as default

Return Value

void

void getDefaultType()

Gets the default type

Return Value

void