summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2026-10-22 15:05:23 -0500
committerGitHub <noreply@github.com>2026-10-22 15:05:23 -0500
commite1d35f666cc35f6ead55d32ea2679df44d04da72 (patch)
treedbcb08cbc40cb0f3e630a5c63201876a7a1e467a /Source/Core/DiscIO/VolumeVerifier.cpp
parent10d958e66bb5d7574166a10f57839a288c5a7c64 (diff)
parent7e46e85e8fb3cff68f05bc160c7ac3ed77b1414b (diff)
Merge pull request #14913 from jordan-woyak/md5
Common: Introduce MD5Context class and ComputeMD5 function to minimize mbedtls dependence.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index 3031f14a0f..a8122f6711 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -10,7 +10,6 @@
#include <string>
#include <string_view>
-#include <mbedtls/md5.h>
#include <mz.h>
#include <mz_strm.h>
#include <mz_zip.h>
@@ -1087,8 +1086,7 @@ void VolumeVerifier::SetUpHashing()
if (m_hashes_to_calculate.md5)
{
- mbedtls_md5_init(&m_md5_context);
- mbedtls_md5_starts_ret(&m_md5_context);
+ m_md5_context.emplace();
}
if (m_hashes_to_calculate.sha1)
@@ -1231,7 +1229,7 @@ void VolumeVerifier::Process()
if (m_hashes_to_calculate.md5)
{
m_md5_future = std::async(std::launch::async, [this, byte_increment] {
- mbedtls_md5_update_ret(&m_md5_context, m_data.data(), byte_increment);
+ m_md5_context->Update(std::span{m_data}.first(byte_increment));
});
}
@@ -1324,7 +1322,7 @@ void VolumeVerifier::Finish()
if (m_hashes_to_calculate.md5)
{
m_result.hashes.md5 = std::vector<u8>(16);
- mbedtls_md5_finish_ret(&m_md5_context, m_result.hashes.md5.data());
+ m_md5_context->Finish(m_result.hashes.md5.data());
}
if (m_hashes_to_calculate.sha1)