TrinityCore
Loading...
Searching...
No Matches
WorldPacketCrypt Class Reference

#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
 

Detailed Description

Definition at line 25 of file WorldPacketCrypt.h.

Constructor & Destructor Documentation

◆ WorldPacketCrypt()

WorldPacketCrypt::WorldPacketCrypt ( )

Definition at line 22 of file WorldPacketCrypt.cpp.

Member Function Documentation

◆ DecryptRecv()

void WorldPacketCrypt::DecryptRecv ( uint8 *  data,
size_t  len 
)

◆ EncryptSend()

void WorldPacketCrypt::EncryptSend ( uint8 *  data,
size_t  len 
)

◆ Init() [1/2]

void WorldPacketCrypt::Init ( SessionKey const &  K)

Definition at line 26 of file WorldPacketCrypt.cpp.

References Init().

Referenced by WorldSocket::HandleAuthSessionCallback(), and Init().

◆ Init() [2/2]

void WorldPacketCrypt::Init ( SessionKey const &  K,
std::span< uint8 const, 16 >  serverKey,
std::span< uint8 const, 16 >  clientKey 
)

◆ IsInitialized()

bool WorldPacketCrypt::IsInitialized ( ) const
inline

Definition at line 35 of file WorldPacketCrypt.h.

Referenced by WorldSocket::ReadHeaderHandler(), and WorldSocket::SendPacket().

Member Data Documentation

◆ _clientDecrypt

Trinity::Crypto::ARC4 WorldPacketCrypt::_clientDecrypt
private

Definition at line 38 of file WorldPacketCrypt.h.

Referenced by DecryptRecv(), and Init().

◆ _initialized

bool WorldPacketCrypt::_initialized
private

Definition at line 40 of file WorldPacketCrypt.h.

Referenced by DecryptRecv(), EncryptSend(), and Init().

◆ _serverEncrypt

Trinity::Crypto::ARC4 WorldPacketCrypt::_serverEncrypt
private

Definition at line 39 of file WorldPacketCrypt.h.

Referenced by EncryptSend(), and Init().


The documentation for this class was generated from the following files: