parsidev / Encryption by parsidev

AES Encryption for Laravel 5.5
56
0
1
Package Data
Maintainer Username: parsidev
Maintainer Contact: info@parsidev.ir (Mohammad Reza)
Package Create Date: 2017-09-15
Package Last Update: 2021-10-14
Language: PHP
License: MIT
Last Refreshed: 2024-04-27 03:04:05
Package Statistics
Total Downloads: 56
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 1

Requirement

Laravel 5.5

installation

For install this package Edit your project's composer.json file to require parsidev/encryption

"require": {
    "parsidev/encryption": "dev-master"
},

Now, update Composer:

composer update

Once composer is finished, you need to add the service provider. Open config/app.php, and add a new item to the providers array.

Parsidev\Encryption\EncryptionServiceProvider::class,

Next, add a Facade for more convenient usage. In config/app.php add the following line to the aliases array:

'Encryption' => Parsidev\Encryption\Facades\Encryption::class

Publish config files:

php artisan vendor:publish --provider="Parsidev\Encryption\EncryptionServiceProvider"

Usage

Before using this package you must add your custom key(s) to encryption.php in config folder This package can encrypt your text to the count of keys entered in the config file.

Encrypt

Encryption::encrypt($text);

Decrypt

Encryption::decrypt($text);