Improved encryption
This commit is contained in:
parent
898efe4d49
commit
e01ae32047
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -289,7 +289,7 @@ namespace Memory {
|
|||
|
||||
for (u32 i = 0; i < size; ++i) {
|
||||
dest[i] = buffer[i] ^ key;
|
||||
key += i ^ key;
|
||||
key += i << 3;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Reference in a new issue