forked from ShuriZma/suyu
1
0
Fork 0

file_sys/crypto: Fix missing/unnecessary includes

This commit is contained in:
Zach Hilman 2018-08-24 22:15:32 -04:00
parent d1a6dd61d1
commit 6314a799aa
9 changed files with 10 additions and 5 deletions

View File

@ -133,7 +133,7 @@ KeyManager::KeyManager() {
} }
AttemptLoadKeyFile(yuzu_keys_dir, hactool_keys_dir, "title.keys", true); AttemptLoadKeyFile(yuzu_keys_dir, hactool_keys_dir, "title.keys", true);
AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, "title.keys_autogenerated", false); AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, "title.keys_autogenerated", true);
} }
void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) { void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) {
@ -223,8 +223,7 @@ void KeyManager::WriteKeyToFile(bool title_key, std::string_view keyname,
<< "# If you are experiencing issues involving keys, it may help to delete this file\n"; << "# If you are experiencing issues involving keys, it may help to delete this file\n";
} }
file << std::endl file << fmt::format("\n{} = {}", keyname, Common::HexArrayToString(key));
<< fmt::format("{} = {}", keyname, Common::HexArrayToString(key)) << std::endl;
AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, filename, title_key); AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, filename, title_key);
} }

View File

@ -6,6 +6,7 @@
#include <array> #include <array>
#include <string> #include <string>
#include <string_view>
#include <type_traits> #include <type_traits>
#include <vector> #include <vector>
#include <boost/container/flat_map.hpp> #include <boost/container/flat_map.hpp>

View File

@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <algorithm>
#include <cstring> #include <cstring>
#include "common/assert.h" #include "common/assert.h"
#include "core/crypto/xts_encryption_layer.h" #include "core/crypto/xts_encryption_layer.h"

View File

@ -4,7 +4,6 @@
#pragma once #pragma once
#include <vector>
#include "core/crypto/aes_util.h" #include "core/crypto/aes_util.h"
#include "core/crypto/encryption_layer.h" #include "core/crypto/encryption_layer.h"
#include "core/crypto/key_manager.h" #include "core/crypto/key_manager.h"

View File

@ -16,6 +16,8 @@ SDMCFactory::SDMCFactory(VirtualDir dir_)
return std::make_shared<NAX>(file, id)->GetDecrypted(); return std::make_shared<NAX>(file, id)->GetDecrypted();
})) {} })) {}
SDMCFactory::~SDMCFactory() = default;
ResultVal<VirtualDir> SDMCFactory::Open() { ResultVal<VirtualDir> SDMCFactory::Open() {
return MakeResult<VirtualDir>(dir); return MakeResult<VirtualDir>(dir);
} }

View File

@ -16,6 +16,7 @@ class RegisteredCache;
class SDMCFactory { class SDMCFactory {
public: public:
explicit SDMCFactory(VirtualDir dir); explicit SDMCFactory(VirtualDir dir);
~SDMCFactory();
ResultVal<VirtualDir> Open(); ResultVal<VirtualDir> Open();
std::shared_ptr<RegisteredCache> GetSDMCContents() const; std::shared_ptr<RegisteredCache> GetSDMCContents() const;

View File

@ -2,7 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <algorithm>
#include <array> #include <array>
#include <cstring>
#include <regex> #include <regex>
#include <string> #include <string>
#include <mbedtls/md.h> #include <mbedtls/md.h>

View File

@ -8,6 +8,7 @@
#include <vector> #include <vector>
#include "common/common_types.h" #include "common/common_types.h"
#include "common/swap.h" #include "common/swap.h"
#include "core/crypto/key_manager.h"
#include "core/file_sys/content_archive.h" #include "core/file_sys/content_archive.h"
#include "core/file_sys/vfs.h" #include "core/file_sys/vfs.h"
#include "core/loader/loader.h" #include "core/loader/loader.h"

View File

@ -3,7 +3,6 @@
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h"
#include "core/file_sys/content_archive.h" #include "core/file_sys/content_archive.h"
#include "core/file_sys/romfs.h" #include "core/file_sys/romfs.h"
#include "core/file_sys/xts_archive.h" #include "core/file_sys/xts_archive.h"