diff options
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeGC.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 15d71c74ca..3489965395 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -11,6 +11,8 @@ #include <utility> #include <vector> +#include <mbedtls/sha1.h> + #include "Common/Assert.h" #include "Common/ColorUtil.h" #include "Common/CommonTypes.h" @@ -137,6 +139,19 @@ bool VolumeGC::IsDatelDisc() const return !GetBootDOLOffset(*this, PARTITION_NONE).has_value(); } +std::array<u8, 20> VolumeGC::GetSyncHash() const +{ + mbedtls_sha1_context context; + mbedtls_sha1_init(&context); + mbedtls_sha1_starts_ret(&context); + + AddGamePartitionToSyncHash(&context); + + std::array<u8, 20> hash; + mbedtls_sha1_finish_ret(&context, hash.data()); + return hash; +} + VolumeGC::ConvertedGCBanner VolumeGC::LoadBannerFile() const { GCBanner banner_file; |
