class McryptRandomStringGenerator implements RandomStringGeneratorInterface (View source)

Traits

Constants

ERROR_MESSAGE

The error message when generating the string fails.

Methods

string
binToHex(string $binaryData, int $length)

Converts binary data to hexadecimal of given length

__construct()

Create a new McryptRandomStringGenerator instance

string
generateString(int $length)

Get a randomly generated secure token

Details

string binToHex(string $binaryData, int $length)

Converts binary data to hexadecimal of given length

Parameters

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

Return Value

string

Exceptions

RuntimeException Throws an exception when multibyte support is not enabled

at line line 25
__construct()

Create a new McryptRandomStringGenerator instance

at line line 44
string generateString(int $length)

Get a randomly generated secure token

Parameters

int $length Length of the string to return

Return Value

string

Exceptions

DropboxClientException