diff options
Diffstat (limited to 'src/common/Cryptography/Authentication')
-rw-r--r-- | src/common/Cryptography/Authentication/WorldPacketCrypt.cpp | 4 | ||||
-rw-r--r-- | src/common/Cryptography/Authentication/WorldPacketCrypt.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/common/Cryptography/Authentication/WorldPacketCrypt.cpp b/src/common/Cryptography/Authentication/WorldPacketCrypt.cpp index 926f77d757d..498588c71f0 100644 --- a/src/common/Cryptography/Authentication/WorldPacketCrypt.cpp +++ b/src/common/Cryptography/Authentication/WorldPacketCrypt.cpp @@ -19,11 +19,11 @@ #include <array> #include <cstring> -WorldPacketCrypt::WorldPacketCrypt() : _clientDecrypt(false), _serverEncrypt(true), _clientCounter(0), _serverCounter(0), _initialized(false) +WorldPacketCrypt::WorldPacketCrypt() : _clientDecrypt(false, 256), _serverEncrypt(true, 256), _clientCounter(0), _serverCounter(0), _initialized(false) { } -void WorldPacketCrypt::Init(Trinity::Crypto::AES::Key const& key) +void WorldPacketCrypt::Init(Key const& key) { _clientDecrypt.Init(key); _serverEncrypt.Init(key); diff --git a/src/common/Cryptography/Authentication/WorldPacketCrypt.h b/src/common/Cryptography/Authentication/WorldPacketCrypt.h index 1936ff5ca5f..c36e2b9c93c 100644 --- a/src/common/Cryptography/Authentication/WorldPacketCrypt.h +++ b/src/common/Cryptography/Authentication/WorldPacketCrypt.h @@ -23,9 +23,11 @@ class TC_COMMON_API WorldPacketCrypt { public: + using Key = std::array<uint8, 32>; + WorldPacketCrypt(); - void Init(Trinity::Crypto::AES::Key const& key); + 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); |