phpBB API Documentation
Interface

phpbb\passwords\driver\rehashable_driver_interface

interface rehashable_driver_interface implements driver_interface

Methods

bool is_supported()

Check if hash type is supported

from driver_interface
bool is_legacy()

Check if hash type is a legacy hash type

from driver_interface
string get_prefix()

Returns the hash prefix

from driver_interface
bool|string hash(string $password)

Hash the password

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

Check the password against the supplied hash

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

Get only the settings of the specified hash

from driver_interface
bool needs_rehash(string $hash)

Check if password needs to be rehashed

Details

in driver_interface at line 23
public bool is_supported()

Check if hash type is supported

Return Value

bool True if supported, false if not

in driver_interface at line 30
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

in driver_interface at line 37
public string get_prefix()

Returns the hash prefix

Return Value

string Hash prefix

in driver_interface at line 47
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

in driver_interface at line 58
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

in driver_interface at line 68
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 24
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