This small library generates high entropy random data from /dev/urandom
Aimed to UNIX based systems but has fallbacks for other systems
Generate data in these formats:
- raw
- integer
- hexadecimal
php >= 5.4
Preferable use composer
composer require pedrosancao/php-random-data
$bytes = \PedroSancao\Random::raw($length);
$int = \PedroSancao\Random::int($length);
$hex = \PedroSancao\Random::hex($length);
- add new types (text, dummy base64, etc.)
MIT, see LICENCE.