![]() |
TrinityCore
|
#include <WorldPacketCrypt.h>
Public Member Functions | |
| WorldPacketCrypt () | |
| void | Init (SessionKey const &K) |
| void | Init (SessionKey const &K, std::span< uint8 const, 16 > serverKey, std::span< uint8 const, 16 > clientKey) |
| void | DecryptRecv (uint8 *data, size_t len) |
| void | EncryptSend (uint8 *data, size_t len) |
| bool | IsInitialized () const |
Private Attributes | |
| Trinity::Crypto::ARC4 | _clientDecrypt |
| Trinity::Crypto::ARC4 | _serverEncrypt |
| bool | _initialized |
Definition at line 25 of file WorldPacketCrypt.h.
| WorldPacketCrypt::WorldPacketCrypt | ( | ) |
Definition at line 22 of file WorldPacketCrypt.cpp.
| void WorldPacketCrypt::DecryptRecv | ( | uint8 * | data, |
| size_t | len | ||
| ) |
Definition at line 47 of file WorldPacketCrypt.cpp.
References _clientDecrypt, _initialized, ASSERT, and Trinity::Crypto::ARC4::UpdateData().
Referenced by WorldSocket::ReadHeaderHandler().
| void WorldPacketCrypt::EncryptSend | ( | uint8 * | data, |
| size_t | len | ||
| ) |
Definition at line 53 of file WorldPacketCrypt.cpp.
References _initialized, _serverEncrypt, ASSERT, and Trinity::Crypto::ARC4::UpdateData().
Referenced by WorldSocket::Update().
| void WorldPacketCrypt::Init | ( | SessionKey const & | K | ) |
Definition at line 26 of file WorldPacketCrypt.cpp.
References Init().
Referenced by WorldSocket::HandleAuthSessionCallback(), and Init().
| void WorldPacketCrypt::Init | ( | SessionKey const & | K, |
| std::span< uint8 const, 16 > | serverKey, | ||
| std::span< uint8 const, 16 > | clientKey | ||
| ) |
Definition at line 34 of file WorldPacketCrypt.cpp.
References _clientDecrypt, _initialized, _serverEncrypt, Trinity::Impl::GenericHMAC< HashCreator, DigestLength >::GetDigestOf(), Trinity::Crypto::ARC4::Init(), and Trinity::Crypto::ARC4::UpdateData().
|
inline |
Definition at line 35 of file WorldPacketCrypt.h.
Referenced by WorldSocket::ReadHeaderHandler(), and WorldSocket::SendPacket().
|
private |
Definition at line 38 of file WorldPacketCrypt.h.
Referenced by DecryptRecv(), and Init().
|
private |
Definition at line 40 of file WorldPacketCrypt.h.
Referenced by DecryptRecv(), EncryptSend(), and Init().
|
private |
Definition at line 39 of file WorldPacketCrypt.h.
Referenced by EncryptSend(), and Init().