mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-04 16:59:02 +00:00
Add support for custom decrypted TitleKey
This commit is contained in:
@@ -184,6 +184,12 @@ int GetSettingsFromUsrset(cia_settings *ciaset, user_settings *usrset)
|
||||
|
||||
if(usrset->cia.randomTitleKey)
|
||||
rndset(ciaset->common.titleKey,AES_128_KEY_SIZE);
|
||||
else if(usrset->cia.titleKey){
|
||||
for (size_t count = 0; count < sizeof(ciaset->common.titleKey)/sizeof(ciaset->common.titleKey[0]); count++) {
|
||||
sscanf(usrset->cia.titleKey, "%2hhx", &ciaset->common.titleKey[count]);
|
||||
usrset->cia.titleKey += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
clrmem(ciaset->common.titleKey,AES_128_KEY_SIZE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user