RandomGeneratorFactory
class RandomGeneratorFactory (View source)
A factory for retrieving a random generator, based on the environment
Properties
static bool | $forceNoOpensslRandomPseudoBytes | For testing, openssl_random_pseudo_bytes() override; if true , treat as
if openssl_random_pseudo_bytes() is not available |
|
static bool | $forceNoRandomBytes | For testing, random_bytes() override; if true , treat as if random_bytes()
is not available. |
Methods
static bool
hasOpensslRandomPseudoBytes()
Returns true
if the system has openssl_random_pseudo_bytes()
static bool
hasRandomBytes()
Returns true
if the system has random_bytes()
static RandomGeneratorInterface
getGenerator()
Returns a default random generator, based on the current environment
Details
at line 43
static protected bool
hasOpensslRandomPseudoBytes()
Returns true
if the system has openssl_random_pseudo_bytes()
at line 53
static protected bool
hasRandomBytes()
Returns true
if the system has random_bytes()
at line 63
static RandomGeneratorInterface
getGenerator()
Returns a default random generator, based on the current environment