diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-07-30 14:11:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 14:11:37 +0200 |
| commit | a9d9f5c0daca5527b6cb4b1fe9c2faaab274e895 (patch) | |
| tree | d753b6ff68bcc246e1344fa30db92a8cd8eafa67 /Source/Core/DiscIO/VolumeGC.cpp | |
| parent | 4b6ad977c6103aba8697896337fb17723d24413a (diff) | |
| parent | f8b9034a2857a5dbe92b958f02c440a1fa0d0669 (diff) | |
Merge pull request #10899 from shuffle2/sha1
add hw-accelerated SHA1
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeGC.cpp | 13 |
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 |
