mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
VolumeVerifier: Don't read data multiple times
This commit is contained in:
@@ -156,6 +156,9 @@ bool VolumeWAD::CheckContentIntegrity(const IOS::ES::Content& content,
|
||||
const std::vector<u8>& encrypted_data,
|
||||
const IOS::ES::TicketReader& ticket) const
|
||||
{
|
||||
if (encrypted_data.size() != Common::AlignUp(content.size, 0x40))
|
||||
return false;
|
||||
|
||||
mbedtls_aes_context context;
|
||||
const std::array<u8, 16> key = ticket.GetTitleKey();
|
||||
mbedtls_aes_setkey_dec(&context, key.data(), 128);
|
||||
|
||||
Reference in New Issue
Block a user