Download the PHP package jjoek/laravel-hybrid-encryption without Composer
On this page you can find all versions of the php package jjoek/laravel-hybrid-encryption. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jjoek/laravel-hybrid-encryption
More information about jjoek/laravel-hybrid-encryption
Files in jjoek/laravel-hybrid-encryption
Download jjoek/laravel-hybrid-encryption
More information about jjoek/laravel-hybrid-encryption
Files in jjoek/laravel-hybrid-encryption
Vendor jjoek
Package laravel-hybrid-encryption
Short Description Laravel package for hybrid encryption (RSA-OAEP + AES-256-GCM) for secure API request handling
License MIT
Package laravel-hybrid-encryption
Short Description Laravel package for hybrid encryption (RSA-OAEP + AES-256-GCM) for secure API request handling
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-hybrid-encryption
Laravel Hybrid Encryption
A Laravel package for hybrid encryption using RSA-OAEP + AES-256-GCM for secure API request handling.
Features
- Hybrid Encryption: Combines RSA-OAEP for key exchange with AES-256-GCM for data encryption
- Automatic Request Decryption: Middleware automatically decrypts encrypted requests
- Public Key Endpoint: Built-in endpoint to expose your public key to frontend clients
- Secure by Default: Uses industry-standard encryption algorithms
Installation
From Packagist
Configuration
1. Generate RSA Key Pair
2. Add Keys to Environment
Add to your .env file (replace newlines with \n):
Tip: Use this command to format your key for .env:
3. Publish Configuration (Optional)
Usage
Public Key Endpoint
The package automatically registers a public key endpoint:
Response:
Decrypting Requests
Add the middleware to routes that should accept encrypted requests:
Expected Request Format
Frontend sends encrypted data with these headers:
Request body:
Using the Facade
Configuration Options
Frontend Implementation (JavaScript)
Security Considerations
- Never expose the private key - Keep it secure in environment variables or a secrets manager
- Use HTTPS - Always use TLS in production to protect the encrypted payload in transit
- Key Rotation - Implement a key rotation strategy for production environments
- Key Size - Use at least 2048-bit RSA keys; 4096-bit recommended for sensitive applications
License
MIT License
All versions of laravel-hybrid-encryption with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
phpseclib/phpseclib Version ^3.0
ext-openssl Version *
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
phpseclib/phpseclib Version ^3.0
ext-openssl Version *
The package jjoek/laravel-hybrid-encryption contains the following files
Loading the files please wait ...