pedrosancao / php-random-data
small library generates high entropy random data
Installs: 27 573
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-11-10 09:50:05 UTC
README
This small library generates high entropy random data from /dev/urandom
Aimed to UNIX based systems but has fallbacks for other systems
Formats
Generate data in these formats:
- raw
- integer
- hexadecimal
Requirements
php >= 5.4
Installation
Preferable use composer
composer require pedrosancao/php-random-data
Usage
$bytes = \PedroSancao\Random::raw($length); $int = \PedroSancao\Random::int($length); $hex = \PedroSancao\Random::hex($length);
To do list
- add new types (text, dummy base64, etc.)
Licence
MIT, see LICENCE.