many small changes

added function to fill memory with random bytes (cleaning some code with
that). Removed public build #ifdefs since 3dsguy apparently uploaded the
entire source with all "private" things.
This commit is contained in:
applestash
2014-06-28 18:38:52 +10:00
parent df5c7f500c
commit 65038633e4
12 changed files with 39 additions and 70 deletions
+3 -6
View File
@@ -182,14 +182,11 @@ int GetSettingsFromUsrset(cia_settings *ciaset, user_settings *usrset)
}
// Ticket Data
u64_to_u8(ciaset->tik.ticketId,u64GetRand(),BE);
rndset(ciaset->tik.ticketId,16);
if(usrset->cia.randomTitleKey)
{
u64_to_u8(ciaset->common.titleKey,u64GetRand(),BE);
u64_to_u8((ciaset->common.titleKey+8),u64GetRand(),BE);
}
rndset(ciaset->common.titleKey,16);
else
memset(ciaset->common.titleKey,0,16);
clrmem(ciaset->common.titleKey,16);
ciaset->tik.formatVersion = 1;