Registry / crypto / paragonie-random-compat

paragonie-random-compat

JSON →
library9.99.100phppackagistunverified

PHP 5.x polyfill for random_bytes() and random_int() from PHP 7

composer require paragonie/random_compat
INSTALL
IMPORT
SIG · PARAGONIE-RANDOM-C
P
paragonie-random-compat
cryptophpv9.99.100
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Random
use ParagonIE\RandomCompat\Random;

Generate cryptographically secure random bytes and integers.

use ParagonIE\RandomCompat\Random; $bytes = Random::bytes(16); $int = Random::int(1, 100);
Debug
Known issues
gotchaThis package is only needed for PHP 5.x; PHP 7+ has native functions.
fix
Remove the dependency if your project requires PHP 7 or higher.
affects: >=2.0.0
Upgrade
Version history
9.99.100latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
25
Amazon
1
Resources
paragonie-random-compat — pip install paragonie-random-compat · libregistry