From 0f41e34aa157fad64781f7f071fdadf9ad219db5 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 6 Aug 2025 19:22:16 +0200 Subject: [PATCH] Misc: buildfix --- src/server/game/Scripting/ScriptReloadMgr.cpp | 4 ++-- src/tools/client_launcher/Helper.cpp | 6 +++--- src/tools/connection_patcher/Helper.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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()); } } }