partition_data_manager: Take package2_keys by const reference
These are only ever read from, so we don't need to make a copy of all the keys here.
This commit is contained in:
parent
3d9df49619
commit
e0c76226ad
@ -447,7 +447,7 @@ bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PartitionDataManager::DecryptPackage2(std::array<std::array<u8, 16>, 0x20> package2_keys,
|
void PartitionDataManager::DecryptPackage2(const std::array<Key128, 0x20>& package2_keys,
|
||||||
Package2Type type) {
|
Package2Type type) {
|
||||||
FileSys::VirtualFile file = std::make_shared<FileSys::OffsetVfsFile>(
|
FileSys::VirtualFile file = std::make_shared<FileSys::OffsetVfsFile>(
|
||||||
package2[static_cast<size_t>(type)],
|
package2[static_cast<size_t>(type)],
|
||||||
|
@ -60,7 +60,8 @@ public:
|
|||||||
// Package2
|
// Package2
|
||||||
bool HasPackage2(Package2Type type = Package2Type::NormalMain) const;
|
bool HasPackage2(Package2Type type = Package2Type::NormalMain) const;
|
||||||
FileSys::VirtualFile GetPackage2Raw(Package2Type type = Package2Type::NormalMain) const;
|
FileSys::VirtualFile GetPackage2Raw(Package2Type type = Package2Type::NormalMain) const;
|
||||||
void DecryptPackage2(std::array<std::array<u8, 16>, 0x20> package2, Package2Type type);
|
void DecryptPackage2(const std::array<std::array<u8, 16>, 0x20>& package2_keys,
|
||||||
|
Package2Type type);
|
||||||
const std::vector<u8>& GetPackage2FSDecompressed(
|
const std::vector<u8>& GetPackage2FSDecompressed(
|
||||||
Package2Type type = Package2Type::NormalMain) const;
|
Package2Type type = Package2Type::NormalMain) const;
|
||||||
std::array<u8, 0x10> GetKeyAreaKeyApplicationSource(
|
std::array<u8, 0x10> GetKeyAreaKeyApplicationSource(
|
||||||
|
Loading…
Reference in New Issue
Block a user