Chore: update the bundled shrink library
Refresh lib/shrink.lib and lib/shrink_x64.lib, plus the key header and the key generator that go with them. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
ab990d8d31
commit
ca653ce34b
4 files changed
+29
-3
No files matched your search
+18
-1
@@ -1,7 +1,21 @@
|
|||||||
// V2 License Public Key
|
// V2 License Public Key
|
||||||
// Generated: 2026-03-05 00:48:25
|
// Generated: 2026-03-05 00:48:25
|
||||||
|
#pragma once
|
||||||
|
|
||||||
const BYTE g_LicensePublicKey[64] = {
|
// License public key of this build. DO NOT CHANGE IT.
|
||||||
|
//
|
||||||
|
// The array is const, so it is emitted into a read-only section: any attempt to
|
||||||
|
// overwrite it at run time faults instead of silently succeeding, and every
|
||||||
|
// reader in the process sees exactly the same bytes.
|
||||||
|
//
|
||||||
|
// `extern` + __declspec(selectany) give it one shared definition across
|
||||||
|
// translation units -- the linker merges the per-TU copies into a single
|
||||||
|
// COMDAT -- and extern "C" keeps the symbol name unmangled for callers
|
||||||
|
// outside C++.
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
extern __declspec(selectany) const BYTE g_LicensePublicKey[64] = {
|
||||||
0xa9, 0x5d, 0x1d, 0x44, 0x35, 0x86, 0x85, 0xdd,
|
0xa9, 0x5d, 0x1d, 0x44, 0x35, 0x86, 0x85, 0xdd,
|
||||||
0xbe, 0x27, 0x26, 0x6d, 0xe7, 0x33, 0x27, 0xf8,
|
0xbe, 0x27, 0x26, 0x6d, 0xe7, 0x33, 0x27, 0xf8,
|
||||||
0xbe, 0x2d, 0x87, 0xdd, 0xc1, 0x47, 0x18, 0xbf,
|
0xbe, 0x2d, 0x87, 0xdd, 0xc1, 0x47, 0x18, 0xbf,
|
||||||
@@ -11,3 +25,6 @@ const BYTE g_LicensePublicKey[64] = {
|
|||||||
0x86, 0x64, 0x85, 0xe1, 0xf3, 0xa3, 0x18, 0x95,
|
0x86, 0x64, 0x85, 0xe1, 0xf3, 0xa3, 0x18, 0x95,
|
||||||
0x5d, 0xd6, 0x3f, 0x2f, 0x55, 0x0b, 0x76, 0xbd
|
0x5d, 0xd6, 0x3f, 0x2f, 0x55, 0x0b, 0x76, 0xbd
|
||||||
};
|
};
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Binary file not shown.
Binary file not shown.
@@ -354,7 +354,13 @@ bool base64Decode(const std::string& encoded, BYTE* dataOut, size_t* lenOut)
|
|||||||
std::string formatPublicKeyAsCode(const BYTE* publicKey)
|
std::string formatPublicKeyAsCode(const BYTE* publicKey)
|
||||||
{
|
{
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << "const BYTE g_LicensePublicKey[64] = {\n ";
|
// 生成的代码要能直接替换 common/key.h:extern + selectany 让各 TU 共享
|
||||||
|
// 同一定义(C++14 也能编),extern "C" 让符号名不被修饰、可被其它模块按名字引用。
|
||||||
|
ss << "#pragma once\n\n";
|
||||||
|
ss << "#ifdef __cplusplus\n";
|
||||||
|
ss << "extern \"C\" {\n";
|
||||||
|
ss << "#endif\n";
|
||||||
|
ss << "extern __declspec(selectany) const BYTE g_LicensePublicKey[64] = {\n ";
|
||||||
for (int i = 0; i < V2_PUBKEY_SIZE; i++) {
|
for (int i = 0; i < V2_PUBKEY_SIZE; i++) {
|
||||||
ss << "0x" << std::hex << std::setw(2) << std::setfill('0') << (int)publicKey[i];
|
ss << "0x" << std::hex << std::setw(2) << std::setfill('0') << (int)publicKey[i];
|
||||||
if (i < V2_PUBKEY_SIZE - 1) {
|
if (i < V2_PUBKEY_SIZE - 1) {
|
||||||
@@ -362,7 +368,10 @@ std::string formatPublicKeyAsCode(const BYTE* publicKey)
|
|||||||
if ((i + 1) % 8 == 0) ss << "\n ";
|
if ((i + 1) % 8 == 0) ss << "\n ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ss << "\n};";
|
ss << "\n};\n";
|
||||||
|
ss << "#ifdef __cplusplus\n";
|
||||||
|
ss << "}\n";
|
||||||
|
ss << "#endif";
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user