mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-24 12:25:28 +00:00
partition_data_manager: Eliminate magic value
We can use sizeof to make it obvious at the call site where the value is coming from.
This commit is contained in:
parent
09f884b7bd
commit
04bb47f57f
|
@ -349,8 +349,8 @@ static bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header
|
||||||
Package2Header temp = header;
|
Package2Header temp = header;
|
||||||
AESCipher<Key128> cipher(key, Mode::CTR);
|
AESCipher<Key128> cipher(key, Mode::CTR);
|
||||||
cipher.SetIV(header.header_ctr);
|
cipher.SetIV(header.header_ctr);
|
||||||
cipher.Transcode(&temp.header_ctr, sizeof(Package2Header) - 0x100, &temp.header_ctr,
|
cipher.Transcode(&temp.header_ctr, sizeof(Package2Header) - sizeof(Package2Header::signature),
|
||||||
Op::Decrypt);
|
&temp.header_ctr, Op::Decrypt);
|
||||||
if (temp.magic == Common::MakeMagic('P', 'K', '2', '1')) {
|
if (temp.magic == Common::MakeMagic('P', 'K', '2', '1')) {
|
||||||
header = temp;
|
header = temp;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue