RandomBytesGenerator
in package
implements
RandomGeneratorInterface
RandomBytesGenerator generates strings of random binary data using the built-in `random_bytes()` PHP function
Tags
Interfaces, Classes, Traits and Enums
- RandomGeneratorInterface
- A random generator generates strings of random binary data
Table of Contents
- generate() : string
- Generates a string of randomized binary data
Methods
generate()
Generates a string of randomized binary data
public
generate(int $length) : string
Parameters
- $length : int
-
The number of bytes of random binary data to generate
Tags
Return values
string —A binary string