diff options
Diffstat (limited to 'Source/Core/DiscIO')
| -rw-r--r-- | Source/Core/DiscIO/NANDContentLoader.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/VolumeWii.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp index fe5d77d15e..0178c3c14e 100644 --- a/Source/Core/DiscIO/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/NANDContentLoader.cpp @@ -186,7 +186,7 @@ void NANDContentLoader::InitializeContentEntries(const std::vector<u8>& data_app m_Content.resize(contents.size()); u32 data_app_offset = 0; - const std::vector<u8> title_key = m_ticket.GetTitleKey(); + const std::array<u8, 16> title_key = m_ticket.GetTitleKey(); IOS::ES::SharedContentMap shared_content{m_root}; for (size_t i = 0; i < contents.size(); ++i) diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index b8215527a6..8ccca04409 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -5,6 +5,7 @@ #include "DiscIO/VolumeWii.h" #include <algorithm> +#include <array> #include <cstddef> #include <cstring> #include <map> @@ -97,9 +98,7 @@ VolumeWii::VolumeWii(std::unique_ptr<BlobReader> reader) IOS::ES::TMDReader tmd{std::move(tmd_buffer)}; // Get the decryption key - const std::vector<u8> key = ticket.GetTitleKey(); - if (key.size() != 16) - continue; + const std::array<u8, 16> key = ticket.GetTitleKey(); std::unique_ptr<mbedtls_aes_context> aes_context = std::make_unique<mbedtls_aes_context>(); mbedtls_aes_setkey_dec(aes_context.get(), key.data(), 128); |
