File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ ScriptReloadMgr* ScriptReloadMgr::instance()
3939
4040#include " BuiltInConfig.h"
4141#include " Config.h"
42+ #include " CryptoHash.h"
4243#include " GitRevision.h"
4344#include " Log.h"
4445#include " MPSCQueue.h"
4546#include " Regex.h"
4647#include " ScriptMgr.h"
47- #include " SHA1.h"
4848#include " StartProcess.h"
4949#include " Timer.h"
5050#include " World.h"
@@ -756,7 +756,7 @@ class HotSwapScriptReloadMgr final
756756 auto path = fs::temp_directory_path ();
757757 path /= Trinity::StringFormat (" tc_script_cache_%s_%s" ,
758758 GitRevision::GetBranch (),
759- CalculateSHA1Hash ( sConfigMgr ->GetFilename ()).c_str ());
759+ ByteArrayToHexStr ( Trinity::Crypto::SHA1::GetDigestOf ( sConfigMgr ->GetFilename () )).c_str ());
760760
761761 return path;
762762 }
Original file line number Diff line number Diff line change 1616 */
1717
1818#include " Helper.hpp"
19+ #include " CryptoHash.h"
1920#include " IoContext.h"
2021
2122#include < boost/algorithm/string.hpp>
2425#include < boost/beast.hpp>
2526#include < fstream>
2627#include < iostream>
27- #include < SHA256.h>
2828#include < stdexcept>
2929#include < Util.h>
3030
@@ -38,11 +38,11 @@ namespace ClientLauncher
3838 {
3939 std::string GetFileChecksum (std::vector<unsigned char > const & data)
4040 {
41- SHA256Hash h;
41+ Trinity::Crypto::SHA256 h;
4242 h.UpdateData (data.data (), data.size ());
4343 h.Finalize ();
4444
45- std::string checksum = ByteArrayToHexStr (h.GetDigest (), h. GetLength () );
45+ std::string checksum = ByteArrayToHexStr (h.GetDigest ());
4646 boost::algorithm::to_lower (checksum);
4747 return checksum;
4848 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ namespace Connection_Patcher
5050 h.UpdateData (data.data (), data.size ());
5151 h.Finalize ();
5252
53- return Trinity::Impl:: ByteArrayToHexStr (h.GetDigest (). data (), h. GetDigest (). size ());
53+ return ByteArrayToHexStr (h.GetDigest ());
5454 }
5555 }
5656}
You can’t perform that action at this time.
0 commit comments