summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeGC.cpp
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2022-07-23 22:45:10 -0700
committerShawn Hoffman <godisgovernment@gmail.com>2022-07-26 22:16:37 -0700
commitdd29a54cf6351e79d5c8040f86383eb585ea4aa2 (patch)
treedf5f9e87becf67452c79fb400fdcdc9eec62f40d /Source/Core/DiscIO/VolumeGC.cpp
parent91169333e9028cc78f0b08091000010f07f975bf (diff)
introduce wrapper for SHA1 functionality
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeGC.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp
index 946364b4f7..8279b84820 100644
--- a/Source/Core/DiscIO/VolumeGC.cpp
+++ b/Source/Core/DiscIO/VolumeGC.cpp
@@ -11,11 +11,10 @@
#include <utility>
#include <vector>
-#include <mbedtls/sha1.h>
-
#include "Common/Assert.h"
#include "Common/ColorUtil.h"
#include "Common/CommonTypes.h"
+#include "Common/Crypto/SHA1.h"
#include "Common/Logging/Log.h"
#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
@@ -152,15 +151,11 @@ bool VolumeGC::IsDatelDisc() const
std::array<u8, 20> VolumeGC::GetSyncHash() const
{
- mbedtls_sha1_context context;
- mbedtls_sha1_init(&context);
- mbedtls_sha1_starts_ret(&context);
+ auto context = Common::SHA1::CreateContext();
- AddGamePartitionToSyncHash(&context);
+ AddGamePartitionToSyncHash(context.get());
- std::array<u8, 20> hash;
- mbedtls_sha1_finish_ret(&context, hash.data());
- return hash;
+ return context->Finish();
}
VolumeGC::ConvertedGCBanner VolumeGC::LoadBannerFile() const