Skip to content

Commit

Permalink
use sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbleClick committed May 9, 2024
1 parent bebb5e8 commit 0cffae9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GWToolboxdll/Modules/Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ void Resources::Download(const std::string& url, AsyncLoadMbCallback callback, v
const auto hash_name = [](const std::filesystem::path& file_name) -> std::filesystem::path {
const auto str = file_name.string();
const auto bytes_to_hash = std::vector<byte>(str.begin(), str.end());
auto hash = std::vector<byte>(WC_MD5_DIGEST_SIZE);
wc_Md5Hash(bytes_to_hash.data(), bytes_to_hash.size(), hash.data());
auto hash = std::vector<byte>(WC_SHA256_DIGEST_SIZE);
wc_Sha256Hash(bytes_to_hash.data(), bytes_to_hash.size(), hash.data());
const auto hash_str = std::string(hash.begin(), hash.end());
const auto hash_file = std::filesystem::path(hash_str);
return hash_file;
Expand Down
10 changes: 10 additions & 0 deletions cmake/wolfssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ target_compile_definitions(wolfssl INTERFACE
ECC_TIMING_RESISTANT
TFM_TIMING_RESISTANT
WC_NO_RNG
OPENSSL_EXTRA
NO_OLD_TLS
NO_MD4
NO_MD5
NO_RSA
NO_RC4
NO_PWDBASED
NO_AES_CBC
NO_DEV_URANDOM
WOLFSSL_SP_NO_3072
)
target_link_libraries(wolfssl INTERFACE
"${wolfssl_FOLDER}/lib/wolfssl.lib")

0 comments on commit 0cffae9

Please sign in to comment.