laravel-encrypt-file maintained by arispati
Description
Laravel package for encrypt and decrypt file
Author
Last update
2021/11/12 13:02
(dev-main)
License
Downloads
6
Laravel Encrypt File
Laravel library for encrypt and decrypt file
How to Install
- Install with composer
composer require arispati/laravel-encrypt-file
How to Use
use Arispati\LaravelEncryptFile\Crypt;
// set file path
$source = Storage::disk('local')->path('image.jpg');
$encrypted = Storage::disk('local')->path('encrypted.jpg');
$decrypted = Storage::disk('local')->path('decrypted.jpg');
// Encrypt the file
Crypt::encrypt($source, $encrypted);
// Decrypt the file
Crypt::decrypt($encrypted, $decrypted);