Move EncryptionType to NCCHContainer

This commit is contained in:
Pengfei
2021-08-09 11:16:18 +08:00
parent f22ecacb7c
commit b331f50b91
3 changed files with 951 additions and 950 deletions
-1
View File
@@ -17,7 +17,6 @@
#include "core/db/seed_db.h" #include "core/db/seed_db.h"
#include "core/file_sys/data/data_container.h" #include "core/file_sys/data/data_container.h"
#include "core/file_sys/ncch_container.h" #include "core/file_sys/ncch_container.h"
#include "core/importer.h"
#include "core/key/key.h" #include "core/key/key.h"
namespace Core { namespace Core {
+11 -1
View File
@@ -196,7 +196,17 @@ struct ExHeader_Header {
static_assert(sizeof(ExHeader_Header) == 0x800, "ExHeader structure size is wrong"); static_assert(sizeof(ExHeader_Header) == 0x800, "ExHeader structure size is wrong");
enum class EncryptionType; /**
* Encryption type of an importable content.
*/
enum class EncryptionType {
None,
FixedKey,
NCCHSecure1,
NCCHSecure2,
NCCHSecure3,
NCCHSecure4,
};
/** /**
* Helper which implements an interface to deal with NCCH containers which can * Helper which implements an interface to deal with NCCH containers which can
+4 -12
View File
@@ -46,18 +46,6 @@ constexpr bool IsNandTitle(ContentType type) {
return type == ContentType::SystemTitle || type == ContentType::SystemApplet; return type == ContentType::SystemTitle || type == ContentType::SystemApplet;
} }
/**
* Encryption type of an importable content.
*/
enum class EncryptionType {
None,
FixedKey,
NCCHSecure1,
NCCHSecure2,
NCCHSecure3,
NCCHSecure4,
};
/** /**
* Struct that specifies an importable content. * Struct that specifies an importable content.
*/ */
@@ -187,6 +175,10 @@ public:
bool LoadTMD(ContentType type, u64 id, TitleMetadata& out) const; bool LoadTMD(ContentType type, u64 id, TitleMetadata& out) const;
bool LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out) const; bool LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out) const;
std::string GetTitleContentsPath(const ContentSpecifier& specifier) const;
std::shared_ptr<FileUtil::IOFile> OpenBootContent(const ContentSpecifier& specifier,
const TitleMetadata& tmd) const;
std::shared_ptr<TicketDB>& GetTicketDB() { std::shared_ptr<TicketDB>& GetTicketDB() {
return ticket_db; return ticket_db;
} }