Skip to content

Commit 9be47a3

Browse files
committed
fixed:example build error
1 parent 9968180 commit 9be47a3

File tree

3 files changed

+68
-65
lines changed

3 files changed

+68
-65
lines changed

XEngine_Apps/Authorize_APPClient/Authorize_APPClient.cpp

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <tchar.h>
44
#pragma comment(lib,"Ws2_32.lib")
55
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
6-
#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl")
6+
#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
77
#pragma comment(lib,"XEngine_Client/XClient_Socket")
88
#pragma comment(lib,"XEngine_Client/XClient_APIHelp")
99
#ifdef _WIN64
@@ -23,16 +23,16 @@ using namespace std;
2323
#include <XEngine_Include/XEngine_ProtocolHdr.h>
2424
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
2525
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
26-
#include <XEngine_Include/XEngine_Core/OPenSsl_Define.h>
27-
#include <XEngine_Include/XEngine_Core/OPenSsl_Error.h>
26+
#include <XEngine_Include/XEngine_Core/Cryption_Define.h>
27+
#include <XEngine_Include/XEngine_Core/Cryption_Error.h>
2828
#include <XEngine_Include/XEngine_Client/XClient_Define.h>
2929
#include <XEngine_Include/XEngine_Client/XClient_Error.h>
3030
#include <XEngine_Include/XEngine_Client/APIClient_Define.h>
3131
#include <XEngine_Include/XEngine_Client/APIClient_Error.h>
3232
#include "../../XEngine_Source/XAuth_Protocol.h"
3333

3434
//Windows::vs2022 x86 debug 编译即可
35-
//Linux::g++ -std=c++17 -Wall -g Authorize_APPClient.cpp -o Authorize_APPClient.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_OPenSsl -lXClient_Socket -lXEngine_BaseLib -lXClient_APIHelp -lpthread -ljsoncpp -Wl,-rpath=../../XEngine_Release
35+
//Linux::g++ -std=c++17 -Wall -g Authorize_APPClient.cpp -o Authorize_APPClient.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_Cryption -lXClient_Socket -lXEngine_BaseLib -lXClient_APIHelp -lpthread -ljsoncpp -Wl,-rpath=../../XEngine_Release
3636

3737
//#define _DYNAMIC_CODE
3838
//#define _PASS_ENCRYPT
@@ -68,7 +68,7 @@ XHTHREAD AuthClient_Thread()
6868
if (nMsgLen > 0 && bEncrypto)
6969
{
7070
//只有有后续数据的情况才需要解密
71-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, lpszPass);
71+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, lpszPass);
7272
}
7373
else
7474
{
@@ -131,19 +131,19 @@ int AuthClient_Register()
131131
XCHAR tszDEBuffer[2048] = {};
132132

133133
nMsgLen = st_JsonRoot.toStyledString().length();
134-
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
134+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
135135
APIClient_Http_Request(_X("POST"), lpszUrl, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
136136

137-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
137+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
138138
printf("AuthClient_Register:\n%s\n", tszDEBuffer);
139-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
139+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
140140
}
141141
else
142142
{
143143
APIClient_Http_Request(_X("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
144144

145145
printf("AuthClient_Register:\n%s\n", ptszMsgBuffer);
146-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
146+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
147147
}
148148
return 0;
149149
}
@@ -167,18 +167,18 @@ int AuthClient_Pay()
167167
XCHAR tszDEBuffer[2048] = {};
168168

169169
nMsgLen = st_JsonRoot.toStyledString().length();
170-
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
170+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
171171
APIClient_Http_Request(_X("POST"), lpszUrl, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
172172

173-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
173+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
174174
printf("AuthClient_Pay:\n%s\n", tszDEBuffer);
175-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
175+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
176176
}
177177
else
178178
{
179179
APIClient_Http_Request(_X("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
180180
printf("AuthClient_Pay:\n%s\n", ptszMsgBuffer);
181-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
181+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
182182
}
183183
return 0;
184184
}
@@ -198,7 +198,7 @@ int AuthClient_DynamicCode()
198198
{
199199
XCHAR tszDEBuffer[2048] = {};
200200

201-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
201+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
202202
if (!pSt_JsonReader->parse(tszDEBuffer, tszDEBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
203203
{
204204
return 0;
@@ -221,7 +221,7 @@ int AuthClient_DynamicCode()
221221

222222
nDYCode = st_JsonRoot["nDynamicCode"].asUInt();
223223
xhToken = st_JsonRoot["xhToken"].asUInt64();
224-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
224+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
225225

226226
return 0;
227227
}
@@ -266,7 +266,7 @@ int AuthClient_Login()
266266
memset(tszCodecBuffer, '\0', sizeof(tszCodecBuffer));
267267

268268
st_ProtocolHdr.wCrypto = ENUM_XENGINE_PROTOCOLHDR_CRYPTO_TYPE_XCRYPT;
269-
OPenSsl_XCrypto_Encoder((LPCXSTR)&st_AuthUser, (int*)&st_ProtocolHdr.unPacketSize, (XBYTE*)tszCodecBuffer, lpszPass);
269+
Cryption_XCrypto_Encoder((LPCXSTR)&st_AuthUser, (int*)&st_ProtocolHdr.unPacketSize, (XBYTE*)tszCodecBuffer, lpszPass);
270270

271271
memcpy(tszMsgBuffer, &st_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR));
272272
memcpy(tszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR), tszCodecBuffer, st_ProtocolHdr.unPacketSize);
@@ -310,7 +310,7 @@ int AuthClient_Notice()
310310
{
311311
XCHAR tszDEBuffer[2048] = {};
312312

313-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
313+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
314314
if (!pSt_JsonReader->parse(tszDEBuffer, tszDEBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
315315
{
316316
return 0;
@@ -331,15 +331,15 @@ int AuthClient_Notice()
331331
Json::Value st_JsonArray = st_JsonRoot["Array"][i];
332332

333333
int nMsgLen = st_JsonArray["tszContext"].asString().length();
334-
BaseLib_OperatorCharset_UTFToAnsi(st_JsonArray["tszContext"].asCString(), tszMsgBuffer, &nMsgLen);
334+
BaseLib_Charset_UTFToAnsi(st_JsonArray["tszContext"].asCString(), tszMsgBuffer, &nMsgLen);
335335

336336
#ifdef _MSC_BUILD
337337
printf("AuthClient_Notice:\nID:%lld:%s\n", st_JsonArray["nID"].asInt64(), tszMsgBuffer);
338338
#else
339339
printf("AuthClient_Notice:\nID:%ld:%s\n", st_JsonArray["nID"].asInt64(), tszMsgBuffer);
340340
#endif
341341
}
342-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
342+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
343343
return 0;
344344
}
345345
int AuthClient_GetPass()
@@ -364,18 +364,18 @@ int AuthClient_GetPass()
364364
XCHAR tszDEBuffer[2048] = {};
365365

366366
nMsgLen = st_JsonRoot.toStyledString().length();
367-
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
367+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
368368
APIClient_Http_Request(_X("POST"), lpszUrl, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
369369

370-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
370+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
371371
printf("AuthClient_GetPass:\n%s\n", tszDEBuffer);
372-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
372+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
373373
}
374374
else
375375
{
376376
APIClient_Http_Request(_X("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
377377
printf("AuthClient_GetPass:\n%s\n", ptszMsgBuffer);
378-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
378+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
379379
}
380380

381381
return 0;
@@ -400,18 +400,18 @@ int AuthClient_GetTime()
400400
XCHAR tszDEBuffer[2048] = {};
401401

402402
nMsgLen = st_JsonRoot.toStyledString().length();
403-
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
403+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
404404
APIClient_Http_Request(_X("GET"), tszURLStr, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
405405

406-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
406+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
407407
printf("AuthClient_GetTime:\n%s\n", tszDEBuffer);
408-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
408+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
409409
}
410410
else
411411
{
412412
APIClient_Http_Request(_X("GET"), tszURLStr, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
413413
printf("AuthClient_GetTime:\n%s\n", ptszMsgBuffer);
414-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
414+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
415415
}
416416

417417
return 0;
@@ -439,18 +439,18 @@ int AuthClient_Delete()
439439
XCHAR tszDEBuffer[2048] = {};
440440

441441
nMsgLen = st_JsonRoot.toStyledString().length();
442-
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
442+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
443443
APIClient_Http_Request(_X("POST"), lpszUrl, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
444444

445-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
445+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
446446
printf("AuthClient_Delete:\n%s\n", tszDEBuffer);
447-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
447+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
448448
}
449449
else
450450
{
451451
APIClient_Http_Request(_X("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
452452
printf("AuthClient_Delete:\n%s\n", ptszMsgBuffer);
453-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
453+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
454454
}
455455
return 0;
456456
}
@@ -473,18 +473,18 @@ int AuthClient_Try()
473473
XCHAR tszDEBuffer[2048] = {};
474474

475475
nMsgLen = st_JsonRoot.toStyledString().length();
476-
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
476+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
477477
APIClient_Http_Request(_X("POST"), lpszUrl, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
478478

479-
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
479+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
480480
printf("AuthClient_Try:\n%s\n", tszDEBuffer);
481-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
481+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
482482
}
483483
else
484484
{
485485
APIClient_Http_Request(_X("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
486486
printf("AuthClient_Try:\n%s\n", ptszMsgBuffer);
487-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
487+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
488488
}
489489
return 0;
490490
}

XEngine_Apps/Authorize_APPLocal/Authorize_APPLocal.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <tchar.h>
44
#pragma comment(lib,"Ws2_32")
55
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
6-
#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl")
6+
#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
77
#pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi")
88
#ifdef _WIN64
99
#pragma comment(lib,"../../XEngine_Source/x64/Debug/jsoncpp")
@@ -23,8 +23,8 @@
2323
#include <XEngine_Include/XEngine_ProtocolHdr.h>
2424
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
2525
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
26-
#include <XEngine_Include/XEngine_Core/OPenSsl_Define.h>
27-
#include <XEngine_Include/XEngine_Core/OPenSsl_Error.h>
26+
#include <XEngine_Include/XEngine_Core/Cryption_Define.h>
27+
#include <XEngine_Include/XEngine_Core/Cryption_Error.h>
2828
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Define.h>
2929
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Error.h>
3030
#include "../../XEngine_Source/XAuth_Protocol.h"
@@ -33,7 +33,7 @@
3333

3434
//需要优先配置XEngine
3535
//WINDOWS支持VS2022 x86 debug 编译调试
36-
//g++ -std=c++17 -Wall -g Authorize_APPLocal.cpp -o Authorize_APPLocal.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXEngine_OPenSsl -lXEngine_SystemApi -lAuthorizeModule_CDKey -ljsoncpp -Wl,-rpath=../../XEngine_Release
36+
//g++ -std=c++17 -Wall -g Authorize_APPLocal.cpp -o Authorize_APPLocal.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXEngine_Cryption -lXEngine_SystemApi -lAuthorizeModule_CDKey -ljsoncpp -Wl,-rpath=../../XEngine_Release
3737

3838
XCHAR tszSerialStr[MAX_PATH] = {};
3939
//1.创建CDKEY.或者由管理员创建.
@@ -60,7 +60,7 @@ bool Authorize_APPLocal_Create(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd)
6060
st_AuthLocal.st_AuthRegInfo.enSerialType = ENUM_AUTHORIZE_MODULE_SERIAL_TYPE_TIME;
6161
st_AuthLocal.st_AuthRegInfo.enVModeType = ENUM_AUTHORIZE_MODULE_VERMODE_TYPE_LOCAL;
6262
st_AuthLocal.st_AuthRegInfo.nHasTime = 0;
63-
BaseLib_OperatorTime_TimeToStr(st_AuthLocal.st_AuthRegInfo.tszCreateTime);
63+
BaseLib_Time_TimeToStr(st_AuthLocal.st_AuthRegInfo.tszCreateTime);
6464
_tcsxcpy(st_AuthLocal.st_AuthRegInfo.tszHardware, st_SDKSerial.tszBoardSerial);
6565
_xstprintf(st_AuthLocal.st_AuthRegInfo.tszLeftTime, _X("0")); //0次试用
6666
//序列号信息.可以不写,如果不想启用用户自己注册.或者交给管理员填充
@@ -76,9 +76,9 @@ bool Authorize_APPLocal_Create(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd)
7676
_tcsxcpy(st_AuthLocal.st_AuthSerial.st_DataLimit.tszDataSerial, pptszSerialList[1]);
7777
XCHAR tszTimeStr[128] = {};
7878
XENGINE_LIBTIMER st_LibTime = {};
79-
BaseLib_OperatorTime_GetSysTime(&st_LibTime);
79+
BaseLib_Time_GetSysTime(&st_LibTime);
8080
st_LibTime.wYear += 1; //一年后过期
81-
BaseLib_OperatorTime_TimeToStr(tszTimeStr, NULL, true, &st_LibTime);
81+
BaseLib_Time_TimeToStr(tszTimeStr, NULL, true, &st_LibTime);
8282

8383
_tcsxcpy(st_AuthLocal.st_AuthSerial.st_DataLimit.tszDataTime, tszTimeStr);
8484

@@ -88,7 +88,7 @@ bool Authorize_APPLocal_Create(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd)
8888
_xstprintf(st_AuthLocal.st_AuthUserInfo.tszUserContact, _X("[email protected]"));
8989

9090
Authorize_CDKey_WriteMemory(tszDECodecBuffer, &nRet, &st_AuthLocal);
91-
OPenSsl_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
91+
Cryption_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
9292
FILE* pSt_File = _xtfopen(lpszKeyFile, _X("wb"));
9393
if (NULL == pSt_File)
9494
{
@@ -116,7 +116,7 @@ bool Authorize_APPLocal_Auth(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd, LPCXSTR lp
116116
int nRet = fread(tszENCodecBuffer, 1, sizeof(tszENCodecBuffer), pSt_File);
117117
fclose(pSt_File);
118118

119-
OPenSsl_XCrypto_Decoder(tszENCodecBuffer, &nRet, tszDECodecBuffer, lpszPasswd);
119+
Cryption_XCrypto_Decoder(tszENCodecBuffer, &nRet, tszDECodecBuffer, lpszPasswd);
120120
//printf("大小:%d,内容:\n%s\n", nRet, tszDECodecBuffer);
121121

122122
Authorize_CDKey_ReadMemory(tszDECodecBuffer, nRet, &st_AuthLocal);
@@ -129,7 +129,7 @@ bool Authorize_APPLocal_Auth(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd, LPCXSTR lp
129129
memset(tszENCodecBuffer, '\0', sizeof(tszENCodecBuffer));
130130
memset(tszDECodecBuffer, '\0', sizeof(tszDECodecBuffer));
131131
Authorize_CDKey_WriteMemory(tszDECodecBuffer, &nRet, &st_AuthLocal);
132-
OPenSsl_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
132+
Cryption_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
133133
pSt_File = _xtfopen(lpszKeyFile, _X("wb"));
134134
fwrite(tszENCodecBuffer, 1, nRet, pSt_File);
135135
fclose(pSt_File);
@@ -151,7 +151,7 @@ bool Authorize_APPLocal_Auth(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd)
151151
int nRet = fread(tszENCodecBuffer, 1, sizeof(tszENCodecBuffer), pSt_File);
152152
fclose(pSt_File);
153153

154-
OPenSsl_XCrypto_Decoder(tszENCodecBuffer, &nRet, tszDECodecBuffer, lpszPasswd);
154+
Cryption_XCrypto_Decoder(tszENCodecBuffer, &nRet, tszDECodecBuffer, lpszPasswd);
155155
//printf("大小:%d,内容:\n%s\n", nRet, tszDECodecBuffer);
156156
Authorize_CDKey_ReadMemory(tszDECodecBuffer, nRet, &st_AuthLocal);
157157
if (!Authorize_CDKey_GetLeftTimer(&st_AuthLocal))
@@ -160,7 +160,7 @@ bool Authorize_APPLocal_Auth(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd)
160160
memset(tszENCodecBuffer, '\0', sizeof(tszENCodecBuffer));
161161
memset(tszDECodecBuffer, '\0', sizeof(tszDECodecBuffer));
162162
Authorize_CDKey_WriteMemory(tszDECodecBuffer, &nRet, &st_AuthLocal);
163-
OPenSsl_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
163+
Cryption_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
164164
pSt_File = _xtfopen(lpszKeyFile, _X("wb"));
165165
fwrite(tszENCodecBuffer, 1, nRet, pSt_File);
166166
fclose(pSt_File);
@@ -190,7 +190,7 @@ bool Authorize_APPLocal_Auth(LPCXSTR lpszKeyFile, LPCXSTR lpszPasswd)
190190
memset(tszENCodecBuffer, '\0', sizeof(tszENCodecBuffer));
191191
memset(tszDECodecBuffer, '\0', sizeof(tszDECodecBuffer));
192192
Authorize_CDKey_WriteMemory(tszDECodecBuffer, &nRet, &st_AuthLocal);
193-
OPenSsl_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
193+
Cryption_XCrypto_Encoder(tszDECodecBuffer, &nRet, (XBYTE*)tszENCodecBuffer, lpszPasswd);
194194
pSt_File = _xtfopen(lpszKeyFile, _X("wb"));
195195
fwrite(tszENCodecBuffer, 1, nRet, pSt_File);
196196
fclose(pSt_File);

0 commit comments

Comments
 (0)