AbstractGenerator
class AbstractGenerator implements Generator (View source)
Abstract generator for handling byte generator errors.
Methods
string
getBytes(int $count)
Returns securely generated random bytes.
string|false
readBytes(int $count)
Reads bytes from the randomness source.
Details
at line 15
string
getBytes(int $count)
Returns securely generated random bytes.
This method will always return the correct number of bytes that have been securely generated. If the bytes cannot be securely generated or if the correct number of bytes cannot be generated, the method MUST throw an exception.
at line 42
abstract protected string|false
readBytes(int $count)
Reads bytes from the randomness source.