abstract class base_native extends base

Properties

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

Methods

__construct(config $config, helper $helper)

Constructor of passwords driver object

from  base
bool
is_supported()

Check if hash type is supported

bool
is_legacy()

Check if hash type is a legacy hash type

from  base
bool
needs_rehash(string $hash)

Check if password needs to be rehashed

string
get_settings_only(string $hash, bool $full = false)

Get only the settings of the specified hash

from  base
string
get_algo_name()

Return the constant name for this driver's algorithm

array
get_options()

Return the options set for this driver instance

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

Check the password against the supplied hash

int
get_algo_value()

Return the value for this driver's algorithm

bool|string
hash(string $password)

Hash the password

Details

in base at line 33
__construct(config $config, helper $helper)

Constructor of passwords driver object

Parameters

config $config

phpBB config

helper $helper

Password driver helper

at line 63
bool is_supported()

Check if hash type is supported

Return Value

bool

True if supported, false if not

in base at line 50
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

at line 71
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 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

String containing the hash settings

at line 25
abstract string get_algo_name()

Return the constant name for this driver's algorithm

Return Value

string

at line 32
abstract array get_options()

Return the options set for this driver instance

Return Value

array

at line 37
bool check(string $password, string $hash, array $user_row = [])

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

at line 47
int get_algo_value()

Return the value for this driver's algorithm

Return Value

int

at line 55
bool|string hash(string $password)

Hash the password

Parameters

string $password

The password that should be hashed

Return Value

bool|string

Password hash or false if something went wrong during hashing