Crypt for Laravel
![Software License][ico-license]
![Total Downloads][ico-downloads], (*1)
Cross Platform Encryption and Decryption with Laravel.
Mostly used for API Response Encryption and Decrypt at app Level., (*2)
Compatible with Laravel 5.1 or Higher., (*3)
Install
Via Composer, (*4)
``` bash
$ composer require tzsk/crypt, (*5)
## Configure
` config/app.php `
```php
'providers' => [
...
Tzsk\Crypt\Provider\CryptServiceProvider::class,
...
],
'aliases' => [
...
'StrCrypt' => Tzsk\Crypt\Facade\StrCrypt::class,
...
],
To publish the Configuration file in config/crypt.php Run:, (*6)
php artisan vendor:publish --tag=config
Usage
First use the namespace at the top:, (*7)
use Tzsk\Crypt\Facade\StrCrypt;
Then use it as following:, (*8)
``` php
$text = "Hello World!";, (*9)
$encrypted = StrCrypt::encrypt($text);, (*10)
$decrypted = StrCrypt::decrypt($encrypted);
```, (*11)
Change log
Please see CHANGELOG for more information on what has changed recently., (*12)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*13)
Security
If you discover any security related issues, please email mailtokmahmed@gmail.com instead of using the issue tracker., (*14)
Credits
License
The MIT License (MIT). Please see License File for more information., (*15)