From f14be006beb1cba62116cd1761ea78758a1c34ed Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 8 Jul 2018 22:25:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Possible=20fix=20to=20decryption?= =?UTF-8?q?=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/decryption/decryptChunk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssn/decryption/decryptChunk.ts b/src/ssn/decryption/decryptChunk.ts index 8c60509..7b7fad0 100644 --- a/src/ssn/decryption/decryptChunk.ts +++ b/src/ssn/decryption/decryptChunk.ts @@ -13,7 +13,7 @@ export default function getDecryptor(decryptionKeys: [number, number, number]) { //decrypt byte const keyPart = (key2 | 2) & 0xFFFF; const decryptedByte = (keyPart * (keyPart ^ 1)) >>> 8; - curChar ^= decryptedByte & 0xFF; + curChar = (curChar ^ (decryptedByte & 0xFF)) & 0xFF; //update keys [key0, key1, key2] = updateKeys([key0, key1, key2], curChar);