Files
SimpleRemoter/server/2015Remote/pwd_gen.h
yuanyuanxiang 1b1ce090c8 Release v1.1.3
2025-07-19 22:19:53 +08:00

24 lines
573 B
C++

#pragma once
#include <string>
// 对生成服务端功能进行加密
std::string getHardwareID();
std::string hashSHA256(const std::string& data);
std::string genHMAC(const std::string& pwdHash, const std::string& superPass);
std::string getFixedLengthID(const std::string& hash);
std::string deriveKey(const std::string& password, const std::string& hardwareID);
std::string getDeviceID();
// Use HMAC to sign a message.
uint64_t SignMessage(const std::string& pwd, BYTE* msg, int len);
bool VerifyMessage(const std::string& pwd, BYTE* msg, int len, uint64_t signature);