class bcrypt_wcf2 extends base

Constants

PREFIX

Properties

protected config $config from  base
protected helper $helper
protected string $name from  base
protected bcrypt $bcrypt

Methods

__construct(bcrypt $bcrypt, helper $helper)

Constructor of passwords driver object

bool
is_supported()

Check if hash type is supported

from  base
bool
is_legacy()

Check if hash type is a legacy hash type

bool
needs_rehash(string $hash)

Check if password needs to be rehashed

from  base
string|false
get_settings_only(string $hash, bool $full = false)

Get only the settings of the specified hash

from  base
string
get_prefix()

Returns the hash prefix

bool|string
hash(string $password, $user_row = '')

Hash the password

bool
check(string $password, string $hash, array $user_row = array())

Check the password against the supplied hash

Details

at line 32
__construct(bcrypt $bcrypt, helper $helper)

Constructor of passwords driver object

Parameters

bcrypt $bcrypt

Salted md5 driver

helper $helper

Password driver helper

in base at line 42
bool is_supported()

Check if hash type is supported

Return Value

bool

True if supported, false if not

at line 49
bool is_legacy()

Check if hash type is a legacy hash type

Return Value

bool

True if it's a legacy hash type, false if not

in base at line 58
bool needs_rehash(string $hash)

Check if password needs to be rehashed

Parameters

string $hash

Hash to check for rehash

Return Value

bool

True if password needs to be rehashed, false if not

in base at line 66
string|false get_settings_only(string $hash, bool $full = false)

Get only the settings of the specified hash

Parameters

string $hash

Password hash

bool $full

Return full settings or only settings related to the salt

Return Value

string|false

String containing the hash settings or false if settings are empty or not supported

at line 41
string get_prefix()

Returns the hash prefix

Return Value

string

Hash prefix

at line 57
bool|string hash(string $password, $user_row = '')

Hash the password

Parameters

string $password

The password that should be hashed

$user_row

Return Value

bool|string

Password hash or false if something went wrong during hashing

at line 66
bool check(string $password, string $hash, array $user_row = array())

Check the password against the supplied hash

Parameters

string $password

The password to check

string $hash

The password hash to check against

array $user_row

User's row in users table

Return Value

bool

True if password is correct, else false