aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Accounts/AccountMgr.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-07-26 01:53:34 +0200
committerGitHub <noreply@github.com>2020-07-26 01:53:34 +0200
commit210176fd915cf4ba16f428d3c1a249a71f4aa7a7 (patch)
tree6998a19da1330be8679fe3e760f858915494400b /src/server/game/Accounts/AccountMgr.cpp
parentcdaf890af4b5bb7ce256752b49bba2c0f3ed9264 (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
Diffstat (limited to 'src/server/game/Accounts/AccountMgr.cpp')
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index cc620e241f4..4b370181dee 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -18,12 +18,12 @@
#include "AccountMgr.h"
#include "Config.h"
#include "DatabaseEnv.h"
+#include "CryptoHash.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "Realm.h"
#include "ScriptMgr.h"
-#include "SHA1.h"
#include "Util.h"
#include "World.h"
#include "WorldSession.h"
@@ -379,14 +379,7 @@ uint32 AccountMgr::GetCharactersCount(uint32 accountId)
std::string AccountMgr::CalculateShaPassHash(std::string const& name, std::string const& password)
{
- SHA1Hash sha;
- sha.Initialize();
- sha.UpdateData(name);
- sha.UpdateData(":");
- sha.UpdateData(password);
- sha.Finalize();
-
- return ByteArrayToHexStr(sha.GetDigest(), sha.GetLength());
+ return ByteArrayToHexStr(Trinity::Crypto::SHA1::GetDigestOf(name, ":", password));
}
bool AccountMgr::IsBannedAccount(std::string const& name)