arispati / laravel-encrypt-file
Laravel package for encrypt and decrypt file
v0.1.0
2021-11-12 12:02 UTC
Requires
- php: ^7|^8
- arispati/php-encrypt-file: 0.1.0
- illuminate/support: ~5.0|~6.0|~7.0|^8.0
README
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);