diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-06-26 23:38:58 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2017-06-27 00:01:20 +0200 |
| commit | 6d821de2b9803e2a4993ae4e6b38a4b8126a61fa (patch) | |
| tree | f1af8cc3c6e841f0670462c27aea8e581587d616 /Source/Core/DiscIO/VolumeWii.cpp | |
| parent | aa020040f6a1e47950d81d567a91101a42647901 (diff) | |
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.
Diffstat (limited to 'Source/Core/DiscIO/VolumeWii.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWii.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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); |
