paragonie/sodium_compat
Pure-PHP polyfill for PHP’s Sodium (libsodium) cryptography API. Transparently uses the native sodium extension when available; otherwise falls back to a compatible implementation. v1 supports PHP 5.2+ incl. 32-bit; v2 targets PHP 8.1+ only.
Architecture fit: The package is designed as a drop-in polyfill for ext/sodium, making it highly compatible with Laravel's architecture. It requires no structural changes to existing codebases and seamlessly integrates with Laravel's encryption services (e.g., Illuminate\Encryption\Encrypter), allowing consistent cryptographic operations across environments regardless of native extension availability.
Integration feasibility: High feasibility due to Composer-based installation and strict API parity with ext/sodium. Applications using sodium_* functions can adopt it with zero code modifications. The package automatically delegates to the native extension when present, ensuring smooth transitions between development, staging, and production environments.
Technical risk: Performance overhead in pure-PHP mode may impact CPU
How can I help you explore Laravel packages today?