Since: 8.2

interface CryptoSafeEngine implements Engine (View source)

A marker interface indicating that the Random\Engine returns cryptographically secure randomness.

Methods

string
generate()

Generates randomness

from  Engine

Details

string generate()

Generates randomness

Returns randomness and advances the algorithm’s state by one step.

Return Value

string

A non-empty string containing random bytes. The Random\Randomizer works with unsigned 64 bit integers internally. If the returned string contains more than 64 bit (8 byte) of randomness the exceeding bytes will be ignored. Other applications may be able to process more than 64 bit at once.

Exceptions

RandomException
BrokenRandomEngineError