trait RandomStringGeneratorTrait

Class RandomStringGeneratorTrait

Methods

validateLength(int $length)

Validates the length argument of a random string.

string
binToHex(string $binaryData, int $length)

Converts binary data to hexadecimal of arbitrary length.

Details

at line 20
validateLength(int $length)

Validates the length argument of a random string.

Parameters

int $length The length to validate.

Exceptions

InvalidArgumentException

at line 39
string binToHex(string $binaryData, int $length)

Converts binary data to hexadecimal of arbitrary length.

Parameters

string $binaryData The binary data to convert to hex.
int $length The length of the string to return.

Return Value

string