// CryptHSEL.h: interface for the CCrypt_HSEL class. // ////////////////////////////////////////////////////////////////////// #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 //#include "CryptManager.h" #include "HSEL.h" class CryptHSEL //: public CryptManager { public: CryptHSEL(); virtual ~CryptHSEL(); // Server ÃʱâÈ­½Ã, ÀÌÈÄ SetInit(TRUE)¸¦ È£ÃâÇϸé, µ¿ÀÛÇÑ´Ù. BOOL Create(); // Client ÃʱâÈ­½Ã, ¼­¹ö·ÎºÎÅÍ Encode, Decode۸¦ ¹Þ¾Æ ÇÒ´çÇÑ´Ù. // ¸¶Âù°¡Áö·Î SetInit(TRUE)¸¦ È£ÃâÇÏ¸é µ¿ÀÛÇÑ´Ù. BOOL Init( HselInit eninit, HselInit deInit ); // ¾Ïȣȭ µ¿ÀÛ ½ÃÀÛ ¼³Á¤ void SetInit( BOOL val ) { m_bInited = val; } BOOL GetInit() { return m_bInited; } CHSEL_STREAM * GetEnCHSEL_STREAM() { return &m_hEnStream; } CHSEL_STREAM * GetDeCHSEL_STREAM() { return &m_hDeStream; } BOOL Encrypt( char * eBuf, int bufSize ); BOOL Decrypt( char * eBuf, int bufSize ); char GetEnCRCConvertChar(); char GetDeCRCConvertChar(); HselInit& GetEncryptKey() { return m_encKey; } HselInit& GetDecryptKey() { return m_decKey; } private: HselInit m_encKey; HselInit m_decKey; CHSEL_STREAM m_hEnStream; CHSEL_STREAM m_hDeStream; BOOL m_bInited; };