PHP code example of malu / php-encrypted-transmission
1. Go to this page and download the library: Download malu/php-encrypted-transmission 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/ */
malu / php-encrypted-transmission example snippets
// If you installed via composer, just use this code to e
use Malu\Encrypted\Encrypted;
$data = ["hello","malu","bbq"];
// 加密输出
$encrypt_data = Encrypted::encrypt(json_encode($data), "34f7e6dd6acf03192d82f0337c8c54ba");
echo $encrypt_data;
// 解密输出
echo Encrypted::decrypt($encrypt_data, "34f7e6dd6acf03192d82f0337c8c54ba");
$ composer