PHP code example of ritaswc / sm
1. Go to this page and download the library: Download ritaswc/sm 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/ */
ritaswc / sm example snippets
$helper = new \Ritaswc\SM\SM4();
echo $helper->encrypt('this is key', 'PHP是世界上最好的语言');
echo "\n";
echo $helper->decrypt('this is key', 'TFK6KUnXe7/DLovioxZvU8G8GwcxXTf93GxR0mMiFts=');
shell script
TFK6KUnXe7/DLovioxZvU8G8GwcxXTf93GxR0mMiFts=
PHP是世界上最好的语言