Add the following to your composer.json file
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ib-Jkid/laravel_crypto.git"
}
]
then run
$ composer require ibrodev/crypto
- Provides and artisan command for creating private and public keys
- Encryt and Decrypts Request Automatically
Register the Service Provider on your Lumen/Laravel Application in boostrap/app
$app->register(\Ibrodev\Crypto\ServiceSetupServiceProvider::class);
Add the Encription and Decryption middleware to the application in boostrap/app
protected $middlewareGroups = [
/*
|--------------------------------------------------------------------------
| Register Middleware
|--------------------------------------------------------------------------
|
| Next, we will register the middleware with the application. These can
| be global middleware that run before and after each request into a
| route or middleware that'll be assigned to some specific routes.
|
*/
$app->middleware([
\Ibrodev\Crypto\Middlewares\DecryptionMiddleware::class,
\Ibrodev\Crypto\Middlewares\EncryptionMiddleware::class,
]);
];
Run the artisan command to generate a public and private key
php artisan crypto:init
composer run test
The MIT License (MIT).