mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-05 08:49:03 +00:00
ctrtool: Add support for inline decryption
This commit is contained in:
@@ -20,6 +20,19 @@ typedef enum
|
||||
NCCHTYPE_PLAINRGN = 5,
|
||||
} ctr_ncchtypes;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NCCHCRYPTO_NONE = 0, //< already decrypted
|
||||
NCCHCRYPTO_FIXED = 1, //< fixed key crypto, used for SDK-made application titles and very very old system titles
|
||||
NCCHCRYPTO_OLD = (1<<1), //< crypto used before 7.0
|
||||
NCCHCRYPTO_SEVEN = (1<<2), //< crypto used starting with 7.0
|
||||
NCCHCRYPTO_NINETHREE = (1<<3), //< crypto used on N3DS starting with 9.3
|
||||
NCCHCRYPTO_NINESIX = (1<<4), //< crypto used on N3DS starting with 9.6
|
||||
NCCHCRYPTO_SEED = (1<<5), //< crypto used starting with 9.6 for preloading titles
|
||||
NCCHCRYPTO_SPECIAL_FSES = NCCHCRYPTO_SEVEN | NCCHCRYPTO_NINETHREE | NCCHCRYPTO_NINESIX | NCCHCRYPTO_SEED, //< ExeFS and RomFS need new keys
|
||||
NCCHCRYPTO_BROKEN = 0xFF //< Internal: seed crypto required but no seed set
|
||||
} ctr_ncchcryptotype;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 signature[0x100];
|
||||
@@ -58,6 +71,8 @@ typedef struct
|
||||
{
|
||||
FILE* file;
|
||||
u8 key[16];
|
||||
u8 special_key[16]; // used with the 7.x+ crypto methods
|
||||
u8 seed[16];
|
||||
u32 encrypted;
|
||||
u64 offset;
|
||||
u64 size;
|
||||
|
||||
Reference in New Issue
Block a user