diff options
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 8 |
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) |
