![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cSecureChannel.h>
Public Types | |
| enum | CIPHER_TYPE { CIPHER_None = 0 , CIPHER_RC4 , CIPHER_Blowfish , CIPHER_AES , CIPHER_QTY , CIPHER_KEY_RSA = 31 } |
| typedef cSecureId | SUPER_t |
Public Member Functions | |
| cSecureKnock (cStringA sAppId="", cStringA sUserId="", WORD nCryptAbilities=_1BITMASK(CIPHER_RC4)|_1BITMASK(CIPHER_None)) | |
| HRESULT | Serialize (cArchive &a) |
| HRESULT | SetSecureKnock (cStreamInput &s) |
| HRESULT | SetSecureKnock (const void *pData, size_t nSize) |
| void | SetClear () noexcept |
| bool | IsSame (const cSecureKnock &k) const |
Public Member Functions inherited from GrayLib::cSecureId | |
| cSecureId (cStringA sAppId="", cStringA sUserId="") noexcept | |
| bool | IsSame (const cSecureId &k) const |
Public Attributes | |
| FOURCC | m_nSignature |
| const cSecureKnock::k_SIGNATURE to declare my protocol More... | |
| WORD | m_nVersion |
| const _INC_cSecureChannel_H = my protocol version id More... | |
| WORD | m_nCryptAbilities |
| Am i limited in my crypt abilities ? mask of CIPHER_TYPE. CIPHER_KEY_RSA. More... | |
Public Attributes inherited from GrayLib::cSecureId | |
| cStringA | m_sAppId |
| The clients declared Purpose/Application in talking to the server. e.g. "Browser", "GameClient", "PatchClient", etc. More... | |
| cStringA | m_sUserId |
| The clients User/Account/InstanceId name it wants to login with. derives security privilege level from this login. More... | |
Static Public Attributes | |
| static const FOURCC | k_SIGNATURE = ((DWORD)(BYTE)( 'G' ) | ((DWORD)(BYTE)( 'S' ) << 8) | ((DWORD)(BYTE)( 'e' ) << 16) | ((DWORD)(BYTE)( 'c' ) << 24 )) |
| sent by client as an opening signature. More... | |
| static const size_t | k_SizeMin = 14 |
| min size in bytes for this serialized message. 8 + 6. More... | |
The first message sent from client to server. Serialize this. knock=hello
can be used with _1BITMASK() for m_nCryptAbilities
| Enumerator | |
|---|---|
| CIPHER_None | cCipherNone = for _DEBUG so utilities like WireShark can see my data stream. |
| CIPHER_RC4 | cCipherRC4. Worst cipher. but has no block size/padding. Try not to use this ? |
| CIPHER_Blowfish | cCipherBlowfish has block alignment size. needs padding. |
| CIPHER_AES | cCipherAES. Best but has block alignment size. needs padding. |
| CIPHER_QTY | |
| CIPHER_KEY_RSA | i will/may try to log in using an RSA public key. please send it to me. |
|
inline |
| bool GrayLib::cSecureKnock::IsSame | ( | const cSecureKnock & | k | ) | const |
Send or Receive the knock serialized message.
|
inlinenoexcept |
| HRESULT GrayLib::cSecureKnock::SetSecureKnock | ( | const void * | pData, |
| size_t | nSize | ||
| ) |
Read a knock message from pData if i can.
| HRESULT GrayLib::cSecureKnock::SetSecureKnock | ( | cStreamInput & | s | ) |
Read a knock message from cStreamInput.
|
static |
sent by client as an opening signature.
|
static |
min size in bytes for this serialized message. 8 + 6.
| WORD GrayLib::cSecureKnock::m_nCryptAbilities |
Am i limited in my crypt abilities ? mask of CIPHER_TYPE. CIPHER_KEY_RSA.
| FOURCC GrayLib::cSecureKnock::m_nSignature |
const cSecureKnock::k_SIGNATURE to declare my protocol
| WORD GrayLib::cSecureKnock::m_nVersion |
const _INC_cSecureChannel_H = my protocol version id