Download the PHP package ramazancetinkaya/obscura without Composer
On this page you can find all versions of the php package ramazancetinkaya/obscura. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ramazancetinkaya/obscura
More information about ramazancetinkaya/obscura
Files in ramazancetinkaya/obscura
Package obscura
Short Description A multi-round polynomial-based encryption layer on top of AES-256 for enhanced security, without requiring GMP.
License MIT
Informations about the package obscura
Obscura - AES Cryptor
Obscura is an advanced PHP cryptography library that combines robust AES encryption (AES-256-CBC by default) with a multi-round polynomial-based custom encryption layer for enhanced security. It also supports URL-safe Base64 encoding when desired.
Report a Bug · New Pull Request
No GMP extension needed – everything is done via the Extended Euclidean Algorithm for modular arithmetic.
Disclaimer: This code is presented for educational purposes. For production environments, ensure that you have conducted a thorough security review and implemented best practices for key management, tamper detection, and environment-specific compliance requirements.
⭐ Support the Project
If you find this library helpful, please consider giving it a star on GitHub. Your support helps improve and maintain the project. Thank you! 🌟
Table of Contents
- Features
- Installation
- Usage
- Basic Example
- URL-safe Base64 Example
- Contributing
- License
Features
- AES-256-CBC: Provides a strong, battle-tested encryption foundation via OpenSSL.
- Multi-Round Custom Layer: Applies multiple polynomial transformations on each character, making cryptanalysis more challenging.
- No GMP Dependency: Uses the Extended Euclidean Algorithm for modular inverse, so GMP is not required.
- URL-Safe Base64 Option: Encrypt once, share anywhere. Prevents
+
,/
, and=
characters from breaking URLs. - Strict Typing: Leverages PHP 8.0+ features and enforces strict typing for reliability.
- Custom Exceptions: Throws a
CryptoException
for all encryption/decryption errors, making error handling straightforward.
Installation
You can install the Obscura
library using Composer. Run the following command in your terminal:
This command adds the library to your composer.json and installs it in the vendor/ directory.
Usage
Below are quick examples demonstrating how to use Obscura in your PHP project.
Basic Example
URL-safe Base64 Example
If you prefer URL-safe Base64 encoding (e.g. for inclusion in GET parameters), you can enable it via the constructor:
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for more details.