PHP code example of zhouzishu / laravel-z5encrypt
1. Go to this page and download the library: Download zhouzishu/laravel-z5encrypt 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/ */
zhouzishu / laravel-z5encrypt example snippets
// laravel < 5.5
Zhouzishu\LaravelZ5Encrypt\ServiceProvider::class,
### 添加 alias(optional. if laravel < 5.5)
Z5ENCRYPT_SECRET=
Z5ENCRYPT_TOKEN=
$content = ' function a () { echo "Hello World"; } a();';
$file_name = 'hello.php';
$ret = \Z5Encrypt::encryptFile($content, $file_name);
dd($ret->data); // 加密后的文件内容,可以通过Storage存储到本地及云端