![]() |
TrinityCore
|
#include <WorldPacketCrypt.h>
Public Types | |
| using | Key = std::array< uint8, 32 > |
Public Member Functions | |
| WorldPacketCrypt () | |
| void | Init (Key const &key) |
| bool | PeekDecryptRecv (uint8 *data, size_t length) |
| bool | DecryptRecv (uint8 *data, size_t length, Trinity::Crypto::AES::Tag &tag) |
| bool | EncryptSend (uint8 *data, size_t length, Trinity::Crypto::AES::Tag &tag) |
| bool | IsInitialized () const |
Protected Attributes | |
| Trinity::Crypto::AES | _clientDecrypt |
| Trinity::Crypto::AES | _serverEncrypt |
| uint64 | _clientCounter |
| uint64 | _serverCounter |
| bool | _initialized |
Definition at line 23 of file WorldPacketCrypt.h.
| using WorldPacketCrypt::Key = std::array<uint8, 32> |
Definition at line 26 of file WorldPacketCrypt.h.
| WorldPacketCrypt::WorldPacketCrypt | ( | ) |
Definition at line 22 of file WorldPacketCrypt.cpp.
| bool WorldPacketCrypt::DecryptRecv | ( | uint8 * | data, |
| size_t | length, | ||
| Trinity::Crypto::AES::Tag & | tag | ||
| ) |
Definition at line 56 of file WorldPacketCrypt.cpp.
References _clientCounter, _clientDecrypt, _initialized, and Trinity::Crypto::AES::Process().
Referenced by WorldSocket::ReadDataHandler().
| bool WorldPacketCrypt::EncryptSend | ( | uint8 * | data, |
| size_t | length, | ||
| Trinity::Crypto::AES::Tag & | tag | ||
| ) |
Definition at line 71 of file WorldPacketCrypt.cpp.
References _initialized, _serverCounter, _serverEncrypt, and Trinity::Crypto::AES::Process().
Referenced by WorldSocket::WritePacketToBuffer().
| void WorldPacketCrypt::Init | ( | Key const & | key | ) |
Definition at line 26 of file WorldPacketCrypt.cpp.
References _clientDecrypt, _initialized, _serverEncrypt, and Trinity::Crypto::AES::Init().
Referenced by WorldSocket::HandleEnterEncryptedModeAck().
|
inline |
Definition at line 35 of file WorldPacketCrypt.h.
Referenced by WorldSocket::SendPacket().
| bool WorldPacketCrypt::PeekDecryptRecv | ( | uint8 * | data, |
| size_t | length | ||
| ) |
Definition at line 44 of file WorldPacketCrypt.cpp.
References _clientCounter, _clientDecrypt, _initialized, and Trinity::Crypto::AES::ProcessNoIntegrityCheck().
Referenced by WorldSocket::ReadHeaderHandler().
|
protected |
Definition at line 40 of file WorldPacketCrypt.h.
Referenced by DecryptRecv(), and PeekDecryptRecv().
|
protected |
Definition at line 38 of file WorldPacketCrypt.h.
Referenced by DecryptRecv(), Init(), and PeekDecryptRecv().
|
protected |
Definition at line 42 of file WorldPacketCrypt.h.
Referenced by DecryptRecv(), EncryptSend(), Init(), and PeekDecryptRecv().
|
protected |
Definition at line 41 of file WorldPacketCrypt.h.
Referenced by EncryptSend().
|
protected |
Definition at line 39 of file WorldPacketCrypt.h.
Referenced by EncryptSend(), and Init().