From 6d821de2b9803e2a4993ae4e6b38a4b8126a61fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 26 Jun 2017 23:38:58 +0200 Subject: IOS: Use a std::array for the title key instead of vector The title key is always 16 bytes, so it doesn't make sense to make it a std::vector. --- Source/Core/DiscIO/VolumeWii.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Source/Core/DiscIO/VolumeWii.cpp') 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 +#include #include #include #include @@ -97,9 +98,7 @@ VolumeWii::VolumeWii(std::unique_ptr reader) IOS::ES::TMDReader tmd{std::move(tmd_buffer)}; // Get the decryption key - const std::vector key = ticket.GetTitleKey(); - if (key.size() != 16) - continue; + const std::array key = ticket.GetTitleKey(); std::unique_ptr aes_context = std::make_unique(); mbedtls_aes_setkey_dec(aes_context.get(), key.data(), 128); -- cgit v1.2.3