diff options
| author | bunnei <bunneidev@gmail.com> | 2020-08-17 03:50:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-17 03:50:35 -0400 |
| commit | 0530dd6ea17e643dded01a204cd0311a709c2b5f (patch) | |
| tree | 56649dd8af484c5a078af64b94de68b5f14cecbe /src/core/crypto/partition_data_manager.cpp | |
| parent | d8a90e653660e216423bc989918bcdc93c92f006 (diff) | |
| parent | 04bb47f57f261e4e7a2280924d567683b9815c23 (diff) | |
Merge pull request #4494 from lioncash/transcode
aes_util: Make use of non-template variant of Transcode
Diffstat (limited to 'src/core/crypto/partition_data_manager.cpp')
| -rw-r--r-- | src/core/crypto/partition_data_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp index 3e96f7516..46136d04a 100644 --- a/src/core/crypto/partition_data_manager.cpp +++ b/src/core/crypto/partition_data_manager.cpp @@ -367,8 +367,8 @@ static bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header Package2Header temp = header; AESCipher<Key128> cipher(key, Mode::CTR); cipher.SetIV(header.header_ctr); - cipher.Transcode(&temp.header_ctr, sizeof(Package2Header) - 0x100, &temp.header_ctr, - Op::Decrypt); + cipher.Transcode(&temp.header_ctr, sizeof(Package2Header) - sizeof(Package2Header::signature), + &temp.header_ctr, Op::Decrypt); if (temp.magic == Common::MakeMagic('P', 'K', '2', '1')) { header = temp; return true; |
