{"id":86767,"library":"paragonie-random-compat","title":"Random Compat","description":"PHP 5.x polyfill for random_bytes() and random_int() from PHP 7","status":"active","version":"9.99.100","language":"php","source_language":null,"source_url":"https://github.com/paragonie/random_compat","tags":["random","polyfill","crypto","php5"],"install":[{"cmd":"composer require paragonie/random_compat","lang":"bash","label":"composer require"}],"dependencies":[],"imports":[{"symbol":"Random","correct":"use ParagonIE\\RandomCompat\\Random;"}],"quickstart":{"code":"use ParagonIE\\RandomCompat\\Random;\n\n$bytes = Random::bytes(16);\n$int = Random::int(1, 100);","lang":"php","description":"Generate cryptographically secure random bytes and integers."},"warnings":[{"fix":"Remove the dependency if your project requires PHP 7 or higher.","message":"This package is only needed for PHP 5.x; PHP 7+ has native functions.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'5':4 '7':15 'byte':9 'compat':2 'crypto':18 'int':12 'php':3,14 'php5':19 'polyfil':6,17 'random':1,8,11,16 'x':5","created_at":"2026-06-19T08:07:39.078156+00:00","updated_at":"2026-06-19T08:07:39.078156+00:00","problems":[],"ecosystem":"packagist","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/paragonie/random_compat","github":"https://github.com/paragonie/random_compat","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["crypto","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-19","next_check":"2026-12-16","install_tag":null}}