mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现excel报表文件生成功能
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#ifndef _Crypto_H_
|
||||
#ifndef _Crypto_H_
|
||||
#define _Crypto_H_
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <gmssl/sm4.h>
|
||||
#include <gmssl/hex.h>
|
||||
#include <gmssl/sm2.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -15,6 +18,21 @@ class Crypto
|
||||
public:
|
||||
static string md5(string src);
|
||||
|
||||
/**
|
||||
* @brief SM4-ECB 加密示例
|
||||
* @param key 16字节密钥
|
||||
* @param plaintext 明文数据
|
||||
* @return 密文字节向量
|
||||
*/
|
||||
static std::vector<uint8_t> sm4EcbEncrypt(const std::vector<uint8_t>& key, const std::vector<uint8_t>& plaintext);
|
||||
|
||||
/**
|
||||
* @brief SM4-ECB 解密示例
|
||||
* @param key 16字节密钥
|
||||
* @param ciphertext 密文数据
|
||||
* @return 明文字节向量
|
||||
*/
|
||||
static std::vector<uint8_t> sm4EcbDecrypt(const std::vector<uint8_t>& key, const std::vector<uint8_t>& ciphertext);
|
||||
};
|
||||
|
||||
#endif // ! _Crypto_H_
|
||||
Reference in New Issue
Block a user