\CryptoManana\FactoriesRandomnessFactory

Class RandomnessFactory - Factory object for pseudo-randomness generator instancing.

Summary

Methods
Properties
Constants
__construct()
create()
__debugInfo()
createInstance()
No public properties found
QUASI_SOURCE
PSEUDO_SOURCE
CRYPTO_SOURCE
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

QUASI_SOURCE

QUASI_SOURCE

The quasi-random generator type.

PSEUDO_SOURCE

PSEUDO_SOURCE

The pseudo-random generator type.

CRYPTO_SOURCE

CRYPTO_SOURCE

The cryptographically secure pseudo-random generator type.

Methods

__construct()

__construct() 

Factory constructor.

create()

create(string|null  $type) : \CryptoManana\Core\Abstractions\Randomness\AbstractRandomness|object|null

Create a pseudo-randomness generator.

Parameters

string|null $type

The generator class name as type for creation.

Returns

\CryptoManana\Core\Abstractions\Randomness\AbstractRandomness|object|null —

A generator object or null.

__debugInfo()

__debugInfo() : array

Get debug information for the class instance.

Returns

array —

Debug information.

createInstance()

createInstance(string|null  $type) : \CryptoManana\Core\Abstractions\Randomness\AbstractRandomness|object|null

Create a pseudo-randomness generator.

Parameters

string|null $type

The generator class name as type for creation.

Returns

\CryptoManana\Core\Abstractions\Randomness\AbstractRandomness|object|null —

A generator object or null.