PHP code example of sloumach / full-encryption-package

1. Go to this page and download the library: Download sloumach/full-encryption-package library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sloumach / full-encryption-package example snippets


use FullEncryption\Facades\FullEncrypted;
use App\Models\User;
$user = User::first();
$encrypted = FullEncrypted::fullEncrypt('Hello world!', $user);
$decrypted = FullEncrypted::fullDecrypt($encrypted, $user);

use FullEncryption\Traits\Encryptable;
class User extends Authenticatable {
    use Encryptable;
}

$user = User::first();
$encrypted = $user->fullEncrypt('Hello word');
$decrypted = $user->fullDecrypt($encrypted);