summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2017-06-27 01:02:42 -0700
committerGitHub <noreply@github.com>2017-06-27 01:02:42 -0700
commit0f3ee2f209be901a0b3de2d01d6eb3a47f4af888 (patch)
treed623955f89db5fe078fdf9c5acd21e85347118cc /Source/Core/DiscIO
parent3094b1bd4fa2a9827d8f51884be1415c048974fd (diff)
parent9f08534a47b7da028ff3c027b935b073a94fcbbd (diff)
Merge pull request #5700 from leoetlino/title-key
ESFormats: Minor changes
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/NANDContentLoader.cpp2
-rw-r--r--Source/Core/DiscIO/VolumeWii.cpp5
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);