#ifndef _Crypto_H_ #define _Crypto_H_ #include #include #include #include #include #include #include using namespace std; class Crypto { public: static string md5(string src); /** * @brief SM4-ECB 加密示例 * @param key 16字节密钥 * @param plaintext 明文数据 * @return 密文字节向量 */ static std::vector sm4EcbEncrypt(const std::vector& key, const std::vector& plaintext); /** * @brief SM4-ECB 解密示例 * @param key 16字节密钥 * @param ciphertext 密文数据 * @return 明文字节向量 */ static std::vector sm4EcbDecrypt(const std::vector& key, const std::vector& ciphertext); }; #endif // ! _Crypto_H_