#include "stdafx.h" #include #include "ServerSession.h" // (SUN_SECURE) void ClientCryptPack4Packet::InitCryptInfo( DWORD dwUserKey, BYTE byProtoMajorVer, BYTE byProtoMinorVer) { NODE.m_SNKey.Initialize(dwUserKey, byProtoMajorVer, byProtoMinorVer); } ////////////////////////////////////////////////////////////////////////// // (ABOUNT_CRYPT) // MSG_CG_CRYPTOGRAPHY_KEY ¼ö½Å½Ã CryptManager Instance ¸¸µé±â BOOL ClientCryptPack4Packet::SetCryptographyInfo(MSG_BASE* pMsg) { MSG_CG_CRYPTOGRAPHY_KEY* pRecvMsg = (MSG_CG_CRYPTOGRAPHY_KEY *)pMsg; DWORD dwUserKey = CryptManager::GetUserKeyInCryptInfo(pRecvMsg->GetCryptStream()); InitCryptInfo(dwUserKey, C2S_HIGH_VERSION_NO, C2S_MIDDLE_VERSION_NO); #ifdef __NA000630_070817_MOLA_5th_UPDATE printf("RandomKEY %08X\n", dwUserKey); #endif // CryptManagerDeletator& rMANAGER = NODE.m_pCryptManager; if(GetRecvSNKey() == pRecvMsg->GetSNKey()) { rMANAGER = CryptManager::SetCryptAlgorithmInfo( GetRecvPairSNKey(), pRecvMsg->GetCryptStream(), pRecvMsg->GetCryptInfo()); SetUsePacketCrypt(TRUE); NextRoundSNKey4Recv(); return TRUE; } else { return FALSE; } } // MSG_CG_CRYPTOGRAPHY_SNK_KEY ¼ö½Å½Ã SNK º¯È¯ BOOL ClientCryptPack4Packet::SetCryptographyInfo_SNK(MSG_BASE* pMsg) { MSG_CG_CRYPTOGRAPHY_SNK_KEY* pRecvMsg = (MSG_CG_CRYPTOGRAPHY_SNK_KEY*)pMsg; KEY4SNKey() = pRecvMsg->m_dwSNKey; GetClientSNKey().Initialize(pRecvMsg->m_dwSNKey, C2S_HIGH_VERSION_NO, C2S_MIDDLE_VERSION_NO); return TRUE; } // Get Instance for CLIENT //inline CryptManager* ClientCryptPack4Packet::SetCryptAlgorithmInfo(BYTE byPairSNKey, BYTE* IN cryptInfo, BYTE cryptIdx);