@@ -781,8 +781,11 @@ bool CVerification_XAuthNet::Verification_XAuthNet_Login(LPCXSTR lpszUser, LPCXS
781781 XCHAR tszCodecBuffer[2048 ] = {};
782782
783783 st_ProtocolHdr.wCrypto = ENUM_XENGINE_PROTOCOLHDR_CRYPTO_TYPE_XCRYPT;
784+ #if XENGINE_VERSION_KERNEL >= 9 && XENGINE_VERSION_MAIN >= 32
785+ Cryption_XCrypto_Encoder ((LPCXBTR)&st_AuthUser, (int *)&st_ProtocolHdr.unPacketSize , (XBYTE*)tszCodecBuffer, tszPassStr);
786+ #else
784787 Cryption_XCrypto_Encoder ((LPCXSTR)&st_AuthUser, (int *)&st_ProtocolHdr.unPacketSize , (XBYTE*)tszCodecBuffer, tszPassStr);
785-
788+ # endif
786789 memcpy (tszMsgBuffer, &st_ProtocolHdr, sizeof (XENGINE_PROTOCOLHDR));
787790 memcpy (tszMsgBuffer + sizeof (XENGINE_PROTOCOLHDR), tszCodecBuffer, st_ProtocolHdr.unPacketSize );
788791
@@ -819,7 +822,11 @@ bool CVerification_XAuthNet::Verification_XAuthNet_Login(LPCXSTR lpszUser, LPCXS
819822 {
820823 XCHAR tszCodecBuffer[2048 ] = {};
821824 st_ProtocolHdr.wCrypto = ENUM_XENGINE_PROTOCOLHDR_CRYPTO_TYPE_XCRYPT;
825+ #if XENGINE_VERSION_KERNEL >= 9 && XENGINE_VERSION_MAIN >= 32
826+ Cryption_XCrypto_Decoder ((LPCXBTR)ptszMsgBuffer, &nMsgLen, (XBYTE *)tszCodecBuffer, tszPassStr);
827+ #else
822828 Cryption_XCrypto_Decoder (ptszMsgBuffer, &nMsgLen, tszCodecBuffer, tszPassStr);
829+ #endif
823830 memcpy (&st_UserInfo, tszCodecBuffer, sizeof (VERIFICATION_USERINFO));
824831 }
825832 else
@@ -934,7 +941,11 @@ bool CVerification_XAuthNet::Verification_XAuthNet_HTTPRequest(LPCXSTR lpszURLAd
934941 else
935942 {
936943 XCHAR tszENCodec[2048 ] = {};
944+ #if XENGINE_VERSION_KERNEL >= 9 && XENGINE_VERSION_MAIN >= 32
945+ if (!Cryption_XCrypto_Encoder ((LPCXBTR)lpszMSGBuffer, &nHTTPLen, (XBYTE*)tszENCodec, lpszPassword))
946+ #else
937947 if (!Cryption_XCrypto_Encoder (lpszMSGBuffer, &nHTTPLen, (XBYTE*)tszENCodec, lpszPassword))
948+ #endif
938949 {
939950 Verification_IsErrorOccur = true ;
940951 Verification_dwErrorCode = Cryption_GetLastError ();
@@ -958,7 +969,11 @@ bool CVerification_XAuthNet::Verification_XAuthNet_HTTPRequest(LPCXSTR lpszURLAd
958969 else
959970 {
960971 XCHAR tszDECodec[2048 ] = {};
972+ #if XENGINE_VERSION_KERNEL >= 9 && XENGINE_VERSION_MAIN >= 32
973+ if (!Cryption_XCrypto_Decoder ((LPCXBTR)ptszHTTPBuffer, &nHTTPLen, (XBYTE *)tszDECodec, lpszPassword))
974+ #else
961975 if (!Cryption_XCrypto_Decoder (ptszHTTPBuffer, &nHTTPLen, tszDECodec, lpszPassword))
976+ #endif
962977 {
963978 Verification_IsErrorOccur = true ;
964979 Verification_dwErrorCode = Cryption_GetLastError ();
@@ -1018,7 +1033,11 @@ XHTHREAD XCALLBACK CVerification_XAuthNet::Verification_XAuthNet_Thread(XPVOID l
10181033 if (nMsgLen > 0 && _tcsxlen (pClass_This->tszPassStr ) > 0 )
10191034 {
10201035 // 只有有后续数据的情况才需要解密
1036+ #if XENGINE_VERSION_KERNEL >= 9 && XENGINE_VERSION_MAIN >= 32
1037+ Cryption_XCrypto_Decoder ((LPCXBTR)ptszMsgBuffer, &nMsgLen, (XBYTE *)tszMsgBuffer, pClass_This->tszPassStr );
1038+ #else
10211039 Cryption_XCrypto_Decoder (ptszMsgBuffer, &nMsgLen, tszMsgBuffer, pClass_This->tszPassStr );
1040+ #endif
10221041 }
10231042 else
10241043 {
0 commit comments