‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Crypto\Random Class Reference

Public Member Functions

 generateRandomBytes (int $length)
 
 generateRandomInteger (int $min, int $max)
 
 generateRandomHexString (int $length)
 
 generateRandomPassword (array $passwordRules)
 

Protected Member Functions

 generateRandomBase64String (int $length)
 

Private Attributes

const DEFAULT_PASSWORD_LENGTH = 16
 
const LOWERCASE_CHARACTERS = 'abcdefghijklmnopqrstuvwxyz'
 
const UPPERCASE_CHARACTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
const SPECIAL_CHARACTERS = '!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~'
 
const DIGIT_CHARACTERS = '1234567890'
 

Detailed Description

Crypto safe pseudo-random value generation

Definition at line 26 of file Random.php.

Member Function Documentation

◆ generateRandomBase64String()

TYPO3\CMS\Core\Crypto\Random::generateRandomBase64String ( int  $length)
protected

Generates cryptographic secure pseudo-random base64 string

Definition at line 126 of file Random.php.

References TYPO3\CMS\Core\Utility\StringUtility\base64urlEncode(), and TYPO3\CMS\Core\Crypto\Random\generateRandomBytes().

Referenced by TYPO3\CMS\Core\Crypto\Random\generateRandomPassword().

◆ generateRandomBytes()

TYPO3\CMS\Core\Crypto\Random::generateRandomBytes ( int  $length)

Generates cryptographic secure pseudo-random bytes

Definition at line 37 of file Random.php.

Referenced by TYPO3\CMS\Core\Crypto\Random\generateRandomBase64String(), and TYPO3\CMS\Core\Crypto\Random\generateRandomHexString().

◆ generateRandomHexString()

TYPO3\CMS\Core\Crypto\Random::generateRandomHexString ( int  $length)

◆ generateRandomInteger()

TYPO3\CMS\Core\Crypto\Random::generateRandomInteger ( int  $min,
int  $max 
)

Generates cryptographic secure pseudo-random integers

Definition at line 45 of file Random.php.

◆ generateRandomPassword()

TYPO3\CMS\Core\Crypto\Random::generateRandomPassword ( array  $passwordRules)

Member Data Documentation

◆ DEFAULT_PASSWORD_LENGTH

const TYPO3\CMS\Core\Crypto\Random::DEFAULT_PASSWORD_LENGTH = 16
private

Definition at line 28 of file Random.php.

◆ DIGIT_CHARACTERS

const TYPO3\CMS\Core\Crypto\Random::DIGIT_CHARACTERS = '1234567890'
private

Definition at line 32 of file Random.php.

Referenced by TYPO3\CMS\Core\Crypto\Random\generateRandomPassword().

◆ LOWERCASE_CHARACTERS

const TYPO3\CMS\Core\Crypto\Random::LOWERCASE_CHARACTERS = 'abcdefghijklmnopqrstuvwxyz'
private

Definition at line 29 of file Random.php.

Referenced by TYPO3\CMS\Core\Crypto\Random\generateRandomPassword().

◆ SPECIAL_CHARACTERS

const TYPO3\CMS\Core\Crypto\Random::SPECIAL_CHARACTERS = '!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~'
private

Definition at line 31 of file Random.php.

Referenced by TYPO3\CMS\Core\Crypto\Random\generateRandomPassword().

◆ UPPERCASE_CHARACTERS

const TYPO3\CMS\Core\Crypto\Random::UPPERCASE_CHARACTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
private

Definition at line 30 of file Random.php.

Referenced by TYPO3\CMS\Core\Crypto\Random\generateRandomPassword().