aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Warden/Warden.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-07-26 01:53:34 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-03 19:39:00 +0200
commite9392ad28767626e519c463e2110184d71ba8426 (patch)
treeda391d7daf1ede4ef73883b5053520e160dc4ec4 /src/server/game/Warden/Warden.cpp
parentcaa1e1171a1ea4e2db754cfb52b3be795385d544 (diff)
Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber - Get rid of (most of) the C-style arrays in authserver - CryptoRandom as a unified source for cryptographic randomness - Bring our other crypto APIs into 2020 - BigNumber usability improvements - Authserver is now actually readable as a result of all of the above (cherry picked from commit 210176fd915cf4ba16f428d3c1a249a71f4aa7a7)
Diffstat (limited to 'src/server/game/Warden/Warden.cpp')
-rw-r--r--src/server/game/Warden/Warden.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index e3ddf6a2e74..fdfc128106b 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -30,7 +30,7 @@
#include <openssl/sha.h>
-Warden::Warden() : _session(NULL), _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0),
+Warden::Warden() : _session(NULL), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0),
_dataSent(false), _previousTimestamp(0), _module(NULL), _initialized(false)
{
memset(_inputKey, 0, sizeof(_inputKey));
@@ -131,12 +131,12 @@ void Warden::Update()
void Warden::DecryptData(uint8* buffer, uint32 length)
{
- _inputCrypto.UpdateData(length, buffer);
+ _inputCrypto.UpdateData(buffer, length);
}
void Warden::EncryptData(uint8* buffer, uint32 length)
{
- _outputCrypto.UpdateData(length, buffer);
+ _outputCrypto.UpdateData(buffer, length);
}
bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 length)