diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index aae28472c5..85043b4ef4 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -39,12 +39,12 @@ ScriptReloadMgr* ScriptReloadMgr::instance() #include "BuiltInConfig.h" #include "Config.h" +#include "CryptoHash.h" #include "GitRevision.h" #include "Log.h" #include "MPSCQueue.h" #include "Regex.h" #include "ScriptMgr.h" -#include "SHA1.h" #include "StartProcess.h" #include "Timer.h" #include "World.h" @@ -756,7 +756,7 @@ private: auto path = fs::temp_directory_path(); path /= Trinity::StringFormat("tc_script_cache_%s_%s", GitRevision::GetBranch(), - CalculateSHA1Hash(sConfigMgr->GetFilename()).c_str()); + ByteArrayToHexStr(Trinity::Crypto::SHA1::GetDigestOf(sConfigMgr->GetFilename())).c_str()); return path; } diff --git a/src/tools/client_launcher/Helper.cpp b/src/tools/client_launcher/Helper.cpp index 79d7e8cfd9..edc36bd026 100644 --- a/src/tools/client_launcher/Helper.cpp +++ b/src/tools/client_launcher/Helper.cpp @@ -16,6 +16,7 @@ */ #include "Helper.hpp" +#include "CryptoHash.h" #include "IoContext.h" #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include @@ -38,11 +38,11 @@ namespace ClientLauncher { std::string GetFileChecksum(std::vector const& data) { - SHA256Hash h; + Trinity::Crypto::SHA256 h; h.UpdateData(data.data(), data.size()); h.Finalize(); - std::string checksum = ByteArrayToHexStr(h.GetDigest(), h.GetLength()); + std::string checksum = ByteArrayToHexStr(h.GetDigest()); boost::algorithm::to_lower(checksum); return checksum; } diff --git a/src/tools/connection_patcher/Helper.cpp b/src/tools/connection_patcher/Helper.cpp index c518d167ae..90869f0e65 100644 --- a/src/tools/connection_patcher/Helper.cpp +++ b/src/tools/connection_patcher/Helper.cpp @@ -50,7 +50,7 @@ namespace Connection_Patcher h.UpdateData(data.data(), data.size()); h.Finalize(); - return Trinity::Impl::ByteArrayToHexStr(h.GetDigest().data(), h.GetDigest().size()); + return ByteArrayToHexStr(h.GetDigest()); } } }