mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-05 00:38:49 +00:00
Add CIA building
Quite a lot of code, yeah. The built CIA is almost identical to GM9, with the following differences: 1. Paddings are zeroed out 2. Title key is not written (GM9 gets it from support data/ticket db) 3. Ticket content index is slightly different (GM9 likely takes it from the legit ticket, while we are building a fake one) The 2, 3 points can be fixed probably.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
namespace Core {
|
||||
|
||||
class CIABuilder;
|
||||
class SDMCDecryptor;
|
||||
|
||||
/**
|
||||
@@ -130,6 +131,19 @@ public:
|
||||
*/
|
||||
void AbortDumpCXI();
|
||||
|
||||
/**
|
||||
* Builds a CIA from a content.
|
||||
* Blocks, but can be aborted on another thread.
|
||||
* @return true on success, false otherwise
|
||||
*/
|
||||
bool BuildCIA(const ContentSpecifier& specifier, const std::string& destination,
|
||||
const ProgressCallback& callback = [](std::size_t, std::size_t) {});
|
||||
|
||||
/**
|
||||
* Aborts current CIA building
|
||||
*/
|
||||
void AbortBuildCIA();
|
||||
|
||||
/**
|
||||
* Deletes/Cleans up a content. Used for deleting contents that have
|
||||
* not been fully imported.
|
||||
@@ -172,6 +186,7 @@ private:
|
||||
bool is_good{};
|
||||
Config config;
|
||||
std::unique_ptr<SDMCDecryptor> decryptor;
|
||||
std::unique_ptr<CIABuilder> cia_builder;
|
||||
|
||||
// The NCCH used to dump CXIs.
|
||||
std::unique_ptr<NCCHContainer> dump_cxi_ncch;
|
||||
|
||||
Reference in New Issue
Block a user