composer require ritaswc/sm
$helper = new \Ritaswc\SM\SM4();
echo $helper->encrypt('this is key', 'PHP是世界上最好的语言');
echo "\n";
echo $helper->decrypt('this is key', 'TFK6KUnXe7/DLovioxZvU8G8GwcxXTf93GxR0mMiFts=');
TFK6KUnXe7/DLovioxZvU8G8GwcxXTf93GxR0mMiFts=
PHP是世界上最好的语言
SM is licensed under MIT.