class argon2id extends argon2i

Properties

protected config $config from  base
protected helper $helper from  base
protected string $name from  base
protected int $memory_cost from  argon2i
protected int $threads from  argon2i
protected int $time_cost from  argon2i

Methods

__construct(config $config, helper $helper, int $memory_cost = 65536, int $threads = 2, int $time_cost = 4)

Constructor of passwords driver object

from  argon2i
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

from  argon2i
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

string
get_prefix()

Returns the hash prefix

Details

in argon2i at line 36
__construct(config $config, helper $helper, int $memory_cost = 65536, int $threads = 2, int $time_cost = 4)

Constructor of passwords driver object

Parameters

config $config

phpBB config

helper $helper

Password driver helper

int $memory_cost

Maximum memory (optional)

int $threads

Number of threads to use (optional)

int $time_cost

Maximum amount of time (optional)

in base_native 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

in base_native 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 21
string get_algo_name()

Return the constant name for this driver's algorithm

Return Value

string

in argon2i at line 62
array get_options()

Return the options set for this driver instance

Return Value

array

in base_native 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

in base_native at line 47
int get_algo_value()

Return the value for this driver's algorithm

Return Value

int

in base_native 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

at line 29
string get_prefix()

Returns the hash prefix

Return Value

string

Hash prefix