PHP code example of lyhiving / aes
1. Go to this page and download the library: Download lyhiving/aes 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/ */
lyhiving / aes example snippets
use lyhiving\aes\aes;
$key = 'aKingoftheWorld';
$iv = '76abd3e3a42b41df';
$txt = '我是一段加密的话,ABCD1234。';
$aes = new aes($key, $iv, 'aes-128-cbc');
$txt_en = $aes->encode($txt);
$txt_de = $aes->decode($txt_en);