RandomBytesGenerator
RandomBytesGenerator generates strings of random binary data using the
built-in random_bytes()
PHP function
- Full name:
\Ramsey\Uuid\Generator\RandomBytesGenerator
- This class implements:
\Ramsey\Uuid\Generator\RandomGeneratorInterface
See Also:
- http://php.net/random_bytes - random_bytes()
Methods
generate
Generates a string of randomized binary data
Parameters:
Parameter | Type | Description |
---|---|---|
$length |
int | The number of bytes of random binary data to generate |
Return Value:
A binary string
Throws:
if random_bytes() throws an exception/error
Automatically generated on 2025-03-18