summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-13 15:23:34 +0200
committerLioncash <mathew1800@gmail.com>2018-10-13 15:24:41 +0200
commite0c76226ad3a100637348d822d2c5d7047f78bda (patch)
tree1848d7c0e25ba3baa5a4a33d28345b71ae151825
parentpartition_data_manager: Move IV data to where it's needed in DecryptPackage2() (diff)
downloadyuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.tar
yuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.tar.gz
yuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.tar.bz2
yuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.tar.lz
yuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.tar.xz
yuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.tar.zst
yuzu-e0c76226ad3a100637348d822d2c5d7047f78bda.zip
-rw-r--r--src/core/crypto/partition_data_manager.cpp2
-rw-r--r--src/core/crypto/partition_data_manager.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp
index e364affba..6862a0884 100644
--- a/src/core/crypto/partition_data_manager.cpp
+++ b/src/core/crypto/partition_data_manager.cpp
@@ -447,7 +447,7 @@ bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) {
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) {
FileSys::VirtualFile file = std::make_shared<FileSys::OffsetVfsFile>(
package2[static_cast<size_t>(type)],
diff --git a/src/core/crypto/partition_data_manager.h b/src/core/crypto/partition_data_manager.h
index 9e448f720..0ad007c72 100644
--- a/src/core/crypto/partition_data_manager.h
+++ b/src/core/crypto/partition_data_manager.h
@@ -60,7 +60,8 @@ public:
// Package2
bool HasPackage2(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(
Package2Type type = Package2Type::NormalMain) const;
std::array<u8, 0x10> GetKeyAreaKeyApplicationSource(