phpBB API Documentation
Class

phpbb\passwords\driver\argon2i

class argon2i extends base

Constants

PREFIX

Methods

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

Constructor of passwords driver object

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
bool check(string $password, string $hash, array $user_row = array())

Check the password against the supplied hash

array get_options()

Return the options set for this driver instance

string get_prefix()

Returns the hash prefix

bool|string hash(string $password)

Hash the password

Details

at line 38
public __construct(config $config, helper $helper, int $memory_cost = 1024, int $threads = 2, int $time_cost = 2)

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)

at line 89
public bool is_supported()

Check if hash type is supported

Return Value

bool True if supported, false if not

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

at line 61
public array get_options()

Return the options set for this driver instance

Return Value

array

at line 73
public string get_prefix()

Returns the hash prefix

Return Value

string Hash prefix

at line 81
public 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