final class PasswordHash (View source)

deprecated IMPORTANT: This is a clone of hautelook/phpass –a portable password hashing framework. This used to be delivered via composer, but the package disappeared from there. In version 9 and above this file is not needed, but given 8.5.x's latest in life nature, it's easier for this to be copied as is into the core. Original file continues below: Portable PHP password hashing framework. Version 0.3 / genuine. Written by Solar Designer in 2004-2006 and placed in There's absolutely no warranty. The homepage URL for this framework is: http://www.openwall.com/phpass/ Please be sure to update the Version line if you edit this file in any way. It is suggested that you leave the main version number intact, but indicate your project name (after the slash) and add your own revision information. Please do not change the "private" password hashing method implemented in here, thereby making your hashes incompatible. However, if you must, please change the hash type identifier (the "$P$") to something different. Obviously, since this code is in the public domain, the above are not requirements (there can be none), but merely suggestions.

Properties

private $itoa64
private $iteration_count_log2
private $portable_hashes
private $random_state

Methods

__construct(int $iteration_count_log2, bool $portable_hashes)

Constructor

string
get_random_bytes(int $count)

No description

string
encode64(string $input, int $count)

No description

string
gensalt_private(string $input)

No description

string
crypt_private(string $password, string $setting)

No description

string
gensalt_extended(string $input)

No description

string
gensalt_blowfish(string $input)

No description

HashPassword(string $password)

No description

bool
CheckPassword(string $password, string $stored_hash)

No description

Details

__construct(int $iteration_count_log2, bool $portable_hashes)

Constructor

Parameters

int $iteration_count_log2
bool $portable_hashes

string get_random_bytes(int $count)

No description

Parameters

int $count

Return Value

string

string encode64(string $input, int $count)

No description

Parameters

string $input
int $count

Return Value

string

string gensalt_private(string $input)

No description

Parameters

string $input

Return Value

string

string crypt_private(string $password, string $setting)

No description

Parameters

string $password
string $setting

Return Value

string

string gensalt_extended(string $input)

No description

Parameters

string $input

Return Value

string

string gensalt_blowfish(string $input)

No description

Parameters

string $input

Return Value

string

HashPassword(string $password)

No description

Parameters

string $password

bool CheckPassword(string $password, string $stored_hash)

No description

Parameters

string $password
string $stored_hash

Return Value

bool