awesome-repositories.com
Blog
MCP
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoServidor MCPAcerca deCómo clasificamosPrensa
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
paragonie avatar

paragonie/random_compat

0
View on GitHub↗
8,165 estrellas·148 forks·PHP·MIT·10 vistasparagonie.com/projects↗

Random Compat

random_compat is a backward-compatibility library that provides cryptographically secure random number generation functions for PHP 5.x environments. It delivers the random_bytes() 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 within arbitrary ranges, eliminating modulo bias. When no secure random source is available, the library throws explicit exceptions to make failure modes clear to developers.

The polyfill defines its functions only when the native PHP 7+ equivalents are absent, preventing redeclaration errors in mixed-version environments. It wraps multiple OS-level random number generators behind a unified interface, hiding platform-specific differences from callers. The library exposes procedural functions that internally delegate to static class methods, maintaining PHP 5.x compatibility without breaking modern call patterns.

Features

  • Cryptographic Random Number Generators - Generates unbiased random bytes and integers from system entropy sources for security-sensitive operations.
  • Cryptographic Integer Scaling - Converts raw random bytes into unbiased integers within arbitrary ranges using rejection sampling.
  • Fallback Chains - Selects the best available random source by trying OS-level CSPRNGs in order of security.
  • Priority-Based CSPRNG - Selects the best available operating-system random source through a security-prioritized fallback chain.
  • Unbiased Random Integer Generators - Produces unbiased random integers within arbitrary ranges using rejection sampling to avoid modulo bias.
  • Cross-Platform Abstractions - Wraps multiple OS-level CSPRNGs behind a unified interface, hiding platform-specific differences from callers.
  • Backward Compatibility Libraries - Delivers secure random number generation functions to PHP 5.x applications that cannot use PHP 7+ native implementations.
  • PHP 5.x Compatibility Polyfills - Provides cryptographically secure random byte and integer generation functions for PHP 5.x environments.
  • PHP 5.x CSPRNG Polyfills - Provides cryptographically secure randombytes() and randomint() functions for legacy PHP 5.x environments.
  • PHP 5.x Random Function Compatibility - Provides cryptographically secure random number generation functions for legacy PHP 5.x applications.

Historial de estrellas

Gráfico del historial de estrellas de paragonie/random_compatGráfico del historial de estrellas de paragonie/random_compat

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Alternativas open-source a Random Compat

Proyectos open-source similares, clasificados según cuántas características comparten con Random Compat.
  • kelektiv/node-uuidAvatar de kelektiv

    kelektiv/node-uuid

    15,297Ver en GitHub↗

    node-uuid is a JavaScript library for generating and validating universally unique identifiers that comply with the RFC 4122 standard. It provides a utility for creating random, timestamp-based, or namespace-based identifiers within a Node.js environment. The library includes tools for detecting the specific standard version of a provided identifier and transforming identifiers between different versions. It also provides a command line utility for generating identifiers directly from the terminal. The project covers binary manipulation, including parsing strings into byte arrays and stringi

    TypeScript
    Ver en GitHub↗15,297
  • digitalbazaar/forgeAvatar de digitalbazaar

    digitalbazaar/forge

    5,311Ver en GitHub↗

    Forge is a JavaScript cryptography library providing a comprehensive set of tools for symmetric and asymmetric encryption, hashing, and digital signatures. It includes a full Transport Layer Security implementation for establishing secure network connections and managing encrypted traffic. The project implements a wide array of public key infrastructure tools, including X.509 certificate management, the generation of certificate signing requests, and the validation of certificate chains. It provides a PKCS cryptographic toolkit for handling secure archives and signed messages, alongside suppo

    JavaScript
    Ver en GitHub↗5,311
  • briansmith/ringAvatar de briansmith

    briansmith/ring

    4,091Ver en GitHub↗

    Ring is a low-level cryptographic primitive library and security toolset designed for building portable, secure applications. It provides a collection of implementations for RSA, elliptic curve cryptography, and authenticated symmetric encryption. The project focuses on constant-time cryptography to prevent secret data from leaking through timing side-channel attacks. It utilizes a formal verification tool that generates arithmetic logic from templates, ensuring mathematical correctness and eliminating manual implementation errors. The library includes capabilities for producing cryptographi

    Assembly
    Ver en GitHub↗4,091
  • lucia-auth/luciaAvatar de lucia-auth

    lucia-auth/lucia

    10,461Ver en GitHub↗

    Lucia is an authentication library that provides session management, OAuth integration, and password-based login for web applications. It creates and validates server-side sessions using cryptographically random tokens stored in HttpOnly, Secure, SameSite=Lax cookies, with constant-time token comparison to prevent timing side-channel attacks. The library supports authentication through email and password, GitHub OAuth, Google OAuth, and passkey-based sign-in. It enforces two-factor authentication using time-based one-time passwords (TOTP) from authenticator apps, generates recovery codes for

    authoauthtypescript
    Ver en GitHub↗10,461
Ver las 30 alternativas a Random Compat→

Preguntas frecuentes

¿Qué hace paragonie/random_compat?

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.

¿Cuáles son las características principales de paragonie/random_compat?

Las características principales de paragonie/random_compat son: Cryptographic Random Number Generators, Cryptographic Integer Scaling, Fallback Chains, Priority-Based CSPRNG, Unbiased Random Integer Generators, Cross-Platform Abstractions, Backward Compatibility Libraries, PHP 5.x Compatibility Polyfills.

¿Qué alternativas de código abierto existen para paragonie/random_compat?

Las alternativas de código abierto para paragonie/random_compat incluyen: satori/go.uuid — This is a Go library for generating and parsing universally unique identifiers. It provides a programmatic way to… lucia-auth/lucia — Lucia is an authentication library that provides session management, OAuth integration, and password-based login for… kelektiv/node-uuid — node-uuid is a JavaScript library for generating and validating universally unique identifiers that comply with the… digitalbazaar/forge — Forge is a JavaScript cryptography library providing a comprehensive set of tools for symmetric and asymmetric… briansmith/ring — Ring is a low-level cryptographic primitive library and security toolset designed for building portable, secure… segmentio/ksuid — ksuid is a Go implementation of k-sortable unique identifiers. It provides a system for generating globally unique…