1
0
Fork 0

Improved encryption

This commit is contained in:
JoshuaMKW 2020-08-24 05:24:50 -05:00
parent 898efe4d49
commit e01ae32047
2 changed files with 2 additions and 2 deletions

View file

@ -258,7 +258,7 @@ class CodeHandler:
packet = tools.read_uint32(self.geckoCodes.codeList)
self.geckoCodes.codeList.seek(-4, 1)
tools.write_uint32(self.geckoCodes.codeList, (packet^key) & 0xFFFFFFFF)
key += (i ^ key) & 0xFFFFFFFF
key += (i << 3) & 0xFFFFFFFF
if key > 0xFFFFFFFF:
key -= 0x100000000
i += 1

View file

@ -289,7 +289,7 @@ namespace Memory {
for (u32 i = 0; i < size; ++i) {
dest[i] = buffer[i] ^ key;
key += i ^ key;
key += i << 3;
}
}
};