summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-04-17 04:43:33 +0200
committerLioncash <mathew1800@gmail.com>2020-04-17 05:43:34 +0200
commite2d8be1ca2cee27eb17964dd99c71dfd12431506 (patch)
treea1b92b6e3979373c1fb034e012fb1e9051ecf3db /src/core/crypto/partition_data_manager.cpp
parentCMakeLists: Enable -Wmissing-declarations on Linux builds (diff)
downloadyuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.tar
yuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.tar.gz
yuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.tar.bz2
yuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.tar.lz
yuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.tar.xz
yuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.tar.zst
yuzu-e2d8be1ca2cee27eb17964dd99c71dfd12431506.zip
Diffstat (limited to 'src/core/crypto/partition_data_manager.cpp')
-rw-r--r--src/core/crypto/partition_data_manager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp
index d64302f2e..7ed71ac3a 100644
--- a/src/core/crypto/partition_data_manager.cpp
+++ b/src/core/crypto/partition_data_manager.cpp
@@ -202,8 +202,8 @@ static std::array<Key128, 0x20> FindEncryptedMasterKeyFromHex(const std::vector<
return out;
}
-FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir,
- const std::string& name) {
+static FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir,
+ const std::string& name) {
const auto upper = Common::ToUpper(name);
for (const auto& fname : {name, name + ".bin", upper, upper + ".BIN"}) {
@@ -345,8 +345,7 @@ FileSys::VirtualFile PartitionDataManager::GetPackage2Raw(Package2Type type) con
return package2.at(static_cast<size_t>(type));
}
-bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) {
-
+static bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) {
const std::vector<u8> iv(header.header_ctr.begin(), header.header_ctr.end());
Package2Header temp = header;
AESCipher<Key128> cipher(key, Mode::CTR);