summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/content_archive.h
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-07-30 01:00:09 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-01 06:16:54 +0200
commit03149d3e4a7f8038d9c88cbeb19dee25a39e0042 (patch)
treecae04a5eefd883d1a665d9502370ec5ff9faa3fd /src/core/file_sys/content_archive.h
parentAllow key loading from %YUZU_DIR%/keys in addition to ~/.switch (diff)
downloadyuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar
yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.gz
yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.bz2
yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.lz
yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.xz
yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.zst
yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/content_archive.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h
index 153142b06..e68ab0235 100644
--- a/src/core/file_sys/content_archive.h
+++ b/src/core/file_sys/content_archive.h
@@ -17,6 +17,9 @@
#include "core/loader/loader.h"
namespace FileSys {
+
+union NCASectionHeader;
+
enum class NCAContentType : u8 {
Program = 0,
Meta = 1,
@@ -61,8 +64,6 @@ struct NCAHeader {
};
static_assert(sizeof(NCAHeader) == 0x400, "NCAHeader has incorrect size.");
-union NCASectionHeader;
-
inline bool IsDirectoryExeFS(const std::shared_ptr<VfsDirectory>& pfs) {
// According to switchbrew, an exefs must only contain these two files:
return pfs->GetFile("main") != nullptr && pfs->GetFile("main.npdm") != nullptr;
@@ -94,6 +95,9 @@ protected:
bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override;
private:
+ Core::Crypto::Key128 GetKeyAreaKey(NCASectionCryptoType type) const;
+ VirtualFile Decrypt(NCASectionHeader header, VirtualFile in, u64 starting_offset) const;
+
std::vector<VirtualDir> dirs;
std::vector<VirtualFile> files;
@@ -108,9 +112,6 @@ private:
bool encrypted;
Core::Crypto::KeyManager keys;
- Core::Crypto::Key128 GetKeyAreaKey(NCASectionCryptoType type);
-
- VirtualFile Decrypt(NCASectionHeader header, VirtualFile in, u64 starting_offset);
};
} // namespace FileSys