arispati/laravel-encrypt-file

Laravel package for encrypt and decrypt file

v0.1.0 2021-11-12 12:02 UTC

This package is auto-updated.

Last update: 2024-11-12 18:33:39 UTC


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);