mirror of
https://github.com/Lekensteyn/lglaf.git
synced 2025-02-17 00:30:29 -05:00
Suggested fix by @Lekensteyn
This commit is contained in:
parent
b5692d385a
commit
d459dfe719
1 changed files with 1 additions and 2 deletions
|
@ -6,10 +6,9 @@ from lglaf import int_as_byte
|
|||
|
||||
def key_transform(old_key):
|
||||
new_key = b''
|
||||
old_key = bytearray(old_key)
|
||||
for x in range(32, 0, -1):
|
||||
c = old_key[x-1]
|
||||
if not isinstance(c, int):
|
||||
c = ord(c)
|
||||
new_key += int_as_byte(c - (x % 0x0C))
|
||||
return new_key
|
||||
|
||||
|
|
Loading…
Reference in a new issue