PHP code example of layman / laravel-cipher

1. Go to this page and download the library: Download layman/laravel-cipher 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/ */

    

layman / laravel-cipher example snippets


use Layman\LaravelCipher\Facades\Cipher;

$payload = Cipher::encrypt([
    'name' => '张三',
    'age' => 18,
]);

use Layman\LaravelCipher\Facades\Cipher;

$payload = Cipher::decrypt($payload);
text
laravel-cipher/
├── composer.json
├── README.md
├── config/
│   └── cipher.php
├── src/
│   ├── CipherServiceProvider.php
│   ├── Facades/
│   │   └── Cipher.php
│   ├── Commands/
│   │   └── CipherCommand.php
│   ├── Config/
│   │   ├── AesConfig.php
│   │   ├── Config.php
│   │   ├── ReplayConfig.php
│   │   ├── RsaConfig.php
│   │   ├── SignatureConfig.php
│   ├── Contracts/
│   │   └── CipherInterface.php
│   ├── Internal/
│   │   ├── AesService.php
│   │   ├── RsaService.php
│   │   ├── ReplayService.php
└── tests/
bash
php artisan cipher:secret