🚧 Some more possible decryption fixes
This commit is contained in:
parent
ddeb9f190f
commit
32b0c39444
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ export default function getDecryptor(decryptionKeys: [number, number, number]) {
|
|||
let curChar = encryptedChunk.readUInt8(i);
|
||||
|
||||
//decrypt byte
|
||||
const keyPart = (key2 | 2) & 0xFFFF;
|
||||
const keyPart = ((key2 | 2) >>> 0) & 0xFFFF;
|
||||
const decryptedByte = int32Mul(keyPart, keyPart ^ 1) >>> 8;
|
||||
curChar = (curChar ^ (decryptedByte & 0xFF)) & 0xFF;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import int32Mul from './int32Mul';
|
|||
|
||||
export default function updateKeys([key0, key1, key2]: [number, number, number], curChar: number): [number, number, number] {
|
||||
key0 = getCrc(key0, curChar);
|
||||
key1 = ((int32Mul(((key1 + (key0 & 0xFF)) >>> 0), 134775813) >>> 0) + 1) >>> 0;
|
||||
key1 = ((int32Mul((((key1 >>> 0) + ((key0 >>> 0) & 0xFF)) >>> 0), 134775813) >>> 0) + 1) >>> 0;
|
||||
key2 = getCrc(key2, key1 >>> 24);
|
||||
|
||||
return [key0, key1, key2];
|
||||
|
|
Loading…
Reference in a new issue