class helper

Properties

protected config $config
string $itoa64

base64 alphabet

Methods

__construct(config $config)

Construct a driver helper object

string
hash_encode64(string $input, int $count)

Base64 encode hash

string
unique_id(string $extra = 'c')

Return unique id

string
get_random_salt(int $length, string $rand_seed = '/dev/urandom')

Get random salt with specified length

bool
string_compare(string $string_a, string $string_b)

Compare two strings byte by byte

Details

at line 34
__construct(config $config)

Construct a driver helper object

Parameters

config $config

phpBB configuration

at line 47
string hash_encode64(string $input, int $count)

Base64 encode hash

Parameters

string $input

Input string

int $count

Input string length

Return Value

string

base64 encoded string

at line 95
string unique_id(string $extra = 'c')

Return unique id

Parameters

string $extra

Additional entropy

Return Value

string

Unique id

at line 121
string get_random_salt(int $length, string $rand_seed = '/dev/urandom')

Get random salt with specified length

Parameters

int $length

Salt length

string $rand_seed

Seed for random data (optional). For tests.

Return Value

string

Random salt with specified length

at line 154
bool string_compare(string $string_a, string $string_b)

Compare two strings byte by byte

Parameters

string $string_a

The first string

string $string_b

The second string

Return Value

bool

True if strings are the same, false if not