🚧 Possible fix to decryption errors

This commit is contained in:
C-3PO 2018-07-08 22:25:58 +02:00
parent e355f6979a
commit f14be006be
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -13,7 +13,7 @@ export default function getDecryptor(decryptionKeys: [number, number, number]) {
//decrypt byte //decrypt byte
const keyPart = (key2 | 2) & 0xFFFF; const keyPart = (key2 | 2) & 0xFFFF;
const decryptedByte = (keyPart * (keyPart ^ 1)) >>> 8; const decryptedByte = (keyPart * (keyPart ^ 1)) >>> 8;
curChar ^= decryptedByte & 0xFF; curChar = (curChar ^ (decryptedByte & 0xFF)) & 0xFF;
//update keys //update keys
[key0, key1, key2] = updateKeys([key0, key1, key2], curChar); [key0, key1, key2] = updateKeys([key0, key1, key2], curChar);