1 Repo
Throws specific exceptions when no secure random source is available, making failure modes clear to developers.
Distinct from Exception Handling: Distinct from Exception Handling: focuses on throwing explicit exceptions for unavailable CSPRNG sources, not general API error mapping.
Explore 1 awesome GitHub repository matching web development · Error-Explicit. Refine with filters or upvote what's useful.
randomcompat is a backward-compatibility library that provides cryptographically secure random number generation functions for PHP 5.x environments. It delivers the randombytes() and random_int() functions that are natively available in PHP 7+, enabling legacy applications to generate secure random bytes and unbiased integers from system entropy sources. The library implements a priority-based fallback chain across operating-system CSPRNGs, selecting the best available random source in order of security. It uses rejection sampling to convert raw random bytes into unbiased integers withi
Throws specific exceptions when no secure random source is available, clarifying failure modes.