diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-13 15:20:19 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-13 15:20:21 +0200 |
commit | 3d9df49619a44bacda8c02fea60e63d9a7aa22fc (patch) | |
tree | 0b84d20b329a3849f22e81824ec88382c9225280 /src/core/crypto | |
parent | partition_data_manager: Remove commented out code (diff) | |
download | yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.tar yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.tar.gz yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.tar.bz2 yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.tar.lz yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.tar.xz yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.tar.zst yuzu-3d9df49619a44bacda8c02fea60e63d9a7aa22fc.zip |
Diffstat (limited to 'src/core/crypto')
-rw-r--r-- | src/core/crypto/partition_data_manager.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp index 056119c04..e364affba 100644 --- a/src/core/crypto/partition_data_manager.cpp +++ b/src/core/crypto/partition_data_manager.cpp @@ -469,15 +469,13 @@ void PartitionDataManager::DecryptPackage2(std::array<std::array<u8, 16>, 0x20> if (header.magic != Common::MakeMagic('P', 'K', '2', '1')) return; - const std::vector<u8> s1_iv(header.section_ctr[1].begin(), header.section_ctr[1].end()); - const auto a = std::make_shared<FileSys::OffsetVfsFile>( file, header.section_size[1], header.section_size[0] + sizeof(Package2Header)); auto c = a->ReadAllBytes(); AESCipher<Key128> cipher(package2_keys[revision], Mode::CTR); - cipher.SetIV(s1_iv); + cipher.SetIV({header.section_ctr[1].begin(), header.section_ctr[1].end()}); cipher.Transcode(c.data(), c.size(), c.data(), Op::Decrypt); INIHeader ini; |