Introduction - If you have any usage issues, please Google them yourself
Sm4 encryption and decryption c language source.
The most common source code on the Internet (the original code download link: http: //www.pudn.com/downloads659/sourcecode/others/detail2676934.html) was modified and improved. The download of the original code, the input data is greater than 16 bytes, cbc mode encryption, re-decryption will be an error.
The reason for the error is that ckc mode causes the original code to cause improper use of the initial variable.