denis-kisel / laravel-obfuscator

Obfuscator class for laravel
10 stars 0 forks source link
encoder encryption laravel laravel-obfuscator obfuscator

laravel-obfuscator

Obfuscator class for laravel. Basics on https://github.com/pH-7/Obfuscator-Class

Installation

  1. Run composer require denis-kisel/laravel-obfuscator
  2. Register a service provider in the app.php configuration file
    DenisKisel\Obfuscator\ObfuscatorServiceProvider::class,
  3. Add facade in the same file
    'Obfuscator' => DenisKisel\Obfuscator\Facade\Obfuscator::class

Usage

Example 1

Obfuscator::obfuscateFileFromTo($originalFile, $obfuscatedFile);

Example 2

$data = File::get($originalFile);
File::put($obfuscatedFile, Obfuscator::obfuscateData($data));