getAlternativeGenerator()
getBoolean()
getBytes()
getFloat()
getInteger()
getString()
$generator
Pseudorandom number generator (PRNG)
getAlternativeGenerator() : \RandomLib\Generator
\RandomLib\GeneratorgetBoolean(bool $strong) : bool
booltrue if you need a strong random generator (cryptography)
boolgetBytes(int $length, bool $strong) : string
int
booltrue if you need a strong random generator (cryptography)
\Zend\Math\Exception\RuntimeException |
|---|
stringgetFloat(bool $strong) : float
.1) This function generates floats with platform-dependent precision
PHP uses double precision floating-point format (64-bit) which has 52-bits of significand precision. We gather 7 bytes of random data, and we fix the exponent to the bias (1023). In this way we generate a float of 1.mantissa.
booltrue if you need a strong random generator (cryptography)
floatgetInteger(int $min, int $max, bool $strong) : int
int
int
booltrue if you need a strong random generator (cryptography)
\Zend\Math\Exception\DomainException |
|---|
intgetString(int $length, string | null $charlist, bool $strong) : string
Uses supplied character list for generating the new string. If no character list provided - uses Base 64 character set.
int
stringnull
booltrue if you need a strong random generator (cryptography)
\Zend\Math\Exception\DomainException |
|---|
string$generator : \RandomLib\Generator