This package is abandoned and no longer maintained. The author suggests using the lizhichao/one-sm package instead.

国密加密算法PHP软件实现版

1.0.1 2020-05-25 14:44 UTC

This package is auto-updated.

Last update: 2021-03-02 03:34:15 UTC


README

使用方法
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是世界上最好的语言

Author

License

SM is licensed under MIT.