mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 00:39:14 +00:00
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:
@@ -15,13 +15,11 @@ u8* AesKeyScrambler(u8 *Key, u8 *KeyX, u8 *KeyY)
|
||||
for(int i = 0; i < 16; i++)
|
||||
Key[i] = KeyX[i] ^ ((KeyY[i] >> 2) | ((KeyY[i < 15 ? i+1 : 0] & 3) << 6));
|
||||
|
||||
#ifndef PUBLIC_BUILD
|
||||
const u8 SCRAMBLE_SECRET[16] = {0x51, 0xD7, 0x5D, 0xBE, 0xFD, 0x07, 0x57, 0x6A, 0x1C, 0xFC, 0x2A, 0xF0, 0x94, 0x4B, 0xD5, 0x6C};
|
||||
|
||||
// Apply Secret to get final normal key
|
||||
for(int i = 0; i < 16; i++)
|
||||
Key[i] = Key[i] ^ SCRAMBLE_SECRET[i];
|
||||
#endif
|
||||
|
||||
return Key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user