Security: Improve the authorization of plugins

This commit is contained in:
yuanyuanxiang
2025-06-28 04:03:06 +08:00
parent 246fb01bf5
commit 2e1a5156e9
8 changed files with 57 additions and 6 deletions

View File

@@ -29,6 +29,11 @@ std::string GetMasterId() {
return id;
}
std::string GetHMAC(int offset) {
const Validation * v= (Validation*)(g_MasterID + offset);
return v->Checksum;
}
extern "C" void shrink64to32(const char* input64, char* output32); // output32 必须至少 33 字节
extern "C" void shrink32to4(const char* input32, char* output4); // output4 必须至少 5 字节