https://github.com/bitbeans/lencryption
libsodium based alternative to Laravel`s Crypt
https://github.com/bitbeans/lencryption
Last synced: 12 months ago
JSON representation
libsodium based alternative to Laravel`s Crypt
- Host: GitHub
- URL: https://github.com/bitbeans/lencryption
- Owner: bitbeans
- License: mit
- Created: 2016-03-02T08:03:23.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-02T09:29:26.000Z (about 10 years ago)
- Last Synced: 2025-01-27T23:39:53.668Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lencryption
libsodium based alternative to Laravel`s Crypt
## Installation
Add `bitbeans/lencryption` to `composer.json`.
```
"bitbeans/lencryption": "dev-master"
```
Run `composer update` to pull down the latest version of Yubikey.
Now open up `PROJECTFOLDER/config/app.php` and add the service provider to your `providers` array.
```php
'providers' => array(
Bitbeans\Lencryption\LencryptionServiceProvider::class,
)
```
And also the alias.
```php
'aliases' => array(
'LCrypt' => Bitbeans\Lencryption\LencryptionFacade::class,
)
```
## Configuration
Run `php artisan vendor:publish` and modify the config file (PROJECTFOLDER/config/lencryption.php) with your own information.
## Example
```php
use LCrypt;
LCrypt::encrypt("test");
LCrypt::decrypt("eyJub25jZSI6ImZmOHZVNXN3VlExWkJQMTJTalI2ZmpKXC83WGExd3F1dCIsImNpcGhlcnRleHQiOiIwcDZEWWtYeXE0YmJlTVBtcndqN3lzbUdMRjk5SUpsWW5QMVYifQ==");
```