A secure and easy-to-use PHP library for encrypting data with keys or passwords.
php-encryption is a PHP library for encrypting data with keys or passwords, designed to be secure and difficult to misuse. It solves the problem of insecure PHP encryption code commonly encountered in the ecosystem by providing a robust, easy-to-use API. The library ensures data at rest is protected using strong cryptographic practices.
PHP developers who need to encrypt data securely in their applications, such as those handling sensitive user information or file storage. It is particularly useful for developers who may not be cryptography experts but require reliable encryption.
Developers choose php-encryption because it prioritizes security and ease of use, reducing the risk of common vulnerabilities. Its API is designed to prevent misuse, and it has been extensively reviewed by the PHP security community, making it a trusted alternative to other encryption libraries.
Simple Encryption in PHP.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Prioritizes security with an API designed to prevent misuse, explicitly stated to address common vulnerabilities in PHP encryption code, similar to libsodium.
Offers a simple interface for encryption and decryption, encouraging secure patterns without requiring deep cryptography knowledge, as highlighted in the philosophy.
Only requires PHP with OpenSSL and bundles random_compat, simplifying installation and reducing maintenance overhead, as noted in the dependencies section.
Includes dedicated classes like KeyProtectedByPassword for password-based key encryption and File for secure file operations, making it versatile for data at rest.
Admits it hasn't undergone a formal, paid audit, relying on community review, which may not satisfy strict regulatory or enterprise security requirements.
Requires PHP 5.6+ and OpenSSL 1.0.1+, but using unsupported PHP versions (below 8.0) could introduce vulnerabilities, as warned in the README.
As a standalone library, it lacks built-in integrations with popular PHP frameworks or tools, potentially increasing setup complexity for modern stacks.