Random

readonly class \TYPO3\CMS\Core\Crypto\Random

Crypto safe pseudo-random value generation

Table of Contents

Methods

generateRandomBase64String()  : string
Generates cryptographic secure pseudo-random base64 string
generateRandomBytes()  : string
Generates cryptographic secure pseudo-random bytes
generateRandomHexString()  : string
Generates cryptographic secure pseudo-random hex string
generateRandomInteger()  : int
Generates cryptographic secure pseudo-random integers
generateRandomPassword()  : string
Generates cryptographic secure pseudo-random password based on given password rules

Methods

generateRandomBase64String()

Generates cryptographic secure pseudo-random base64 string

public generateRandomBase64String(int $length) : string

Parameters

$length : int

Return values

string

generateRandomBytes()

Generates cryptographic secure pseudo-random bytes

public generateRandomBytes(int $length) : string

Parameters

$length : int

Return values

string

generateRandomHexString()

Generates cryptographic secure pseudo-random hex string

public generateRandomHexString(int $length) : string

Parameters

$length : int

Return values

string

generateRandomInteger()

Generates cryptographic secure pseudo-random integers

public generateRandomInteger(int $min, int $max) : int

Parameters

$min : int
$max : int

Return values

int

generateRandomPassword()

Generates cryptographic secure pseudo-random password based on given password rules

public generateRandomPassword(array $passwordRules) : string

Parameters

$passwordRules : array

Return values

string
On this page