\ModelsPasswordHash

Portable PHP password hashing framework http://www.openwall.com/phpass/

Summary

Methods
Properties
Constants
hash()
match()
getRandomBytes()
encode64()
genSalt()
genSaltExtended()
genSaltBlowfish()
crypt()
No public properties found
No constants found
No protected methods found
$iterations
$randomState
$itoa64
N/A
No private methods found
No private properties found
N/A

Properties

$iterations

$iterations

$randomState

$randomState

$itoa64

$itoa64

Methods

hash()

hash(string $password, int $iterations, bool $portable) : string

Hashes a given password.

Parameters

string $password
int $iterations
bool $portable

Returns

string

match()

match(string $password, string $stored) : bool

Checks if given password and stored hash match.

Parameters

string $password
string $stored

Returns

bool

getRandomBytes()

getRandomBytes(int $count) : string

Retrieves random bytes of given count.

Parameters

int $count

Returns

string

encode64()

encode64(string $input, int $length) : string

Description

Parameters

string $input
int $length

Returns

string

genSalt()

genSalt(string $input) : string

Generates salt.

Parameters

string $input

Returns

string

genSaltExtended()

genSaltExtended(string $input) : string

Generates salt for the extended hashing method.

Parameters

string $input

Returns

string

genSaltBlowfish()

genSaltBlowfish(string $input) : string

Generates salt for the blowfish hashing method.

Parameters

string $input

Returns

string

crypt()

crypt(string $password, string $setting) : string

Own crypt function, will be used if neither blowfish nor DES are available.

Parameters

string $password
string $setting

Returns

string