phpBB API Documentation
Class

phpbb\passwords\helper

class helper

Methods

array get_combined_hash_settings(string $hash)

Get hash settings from combined hash

string|null combine_hash_output(array $data, string $type, string $value)

Combine hash prefixes, settings, and actual hash

string rebuild_hash(string $prefix, string $settings)

Rebuild hash for hashing functions

string obtain_hash_only(string $hash)

Obtain only the actual hash after the prefixes

Details

at line 28
public array get_combined_hash_settings(string $hash)

Get hash settings from combined hash

Parameters

string $hash Password hash of combined hash

Return Value

array An array containing the hash settings for the hash types in successive order as described by the combined password hash or an empty array if hash does not properly fit the combined hash format

at line 56
public string|null combine_hash_output(array $data, string $type, string $value)

Combine hash prefixes, settings, and actual hash

Parameters

array $data Array containing the keys 'prefix' and 'settings'. It will hold the prefixes and settings
string $type Data type of the supplied value
string $value Value that should be put into the data array

Return Value

string|null Return complete combined hash if type is neither 'prefix' nor 'settings', nothing if it is

at line 83
public string rebuild_hash(string $prefix, string $settings)

Rebuild hash for hashing functions

Parameters

string $prefix Hash prefix
string $settings Hash settings

Return Value

string Rebuilt hash for hashing functions

at line 100
public string obtain_hash_only(string $hash)

Obtain only the actual hash after the prefixes

Parameters

string $hash The full password hash

Return Value

string Actual hash (incl. settings)