PHP code example of ledc / crypt

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

    

ledc / crypt example snippets


use Ledc\Crypt;
$crypt = new AesCrypt($aesKey, 'aes-128-cbc', 'sha256', 30);

// 加密
$crypt->encrypt($data);

// 解密
$crypt->decrypt($payload, $signature);