PHP code example of swordying / crypter
1. Go to this page and download the library: Download swordying/crypter 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/ */
swordying / crypter example snippets
// 引入类文件
ter = new \Swordying\Crypter();
# 明文
$ho = 'Hello World!';
# 加密后的值
$en = $crypter -> handle($ho);
# 散列值
$md = $crypter -> md($ho);
# 解密后的值
$de = $crypter -> de($en['en']);
var_export($ho);
echo "\n";
var_export($en);
echo "\n";
var_export($md);
echo "\n";
var_export($de);
$keys = \Swordying\Crypter::createKeys();
var_export($keys);
// [
// 'public_key' => '',
// 'private_key' => '',
// ];