From 02f4d3ecb5a16e1d77bbe8e5927cf5114649107b Mon Sep 17 00:00:00 2001 From: C-3PO Date: Thu, 5 Jul 2018 03:03:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Do=20not=20skip=20encryption=20h?= =?UTF-8?q?eader=20in=20decryptChunk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/decryption/decryptChunk.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ssn/decryption/decryptChunk.ts b/src/ssn/decryption/decryptChunk.ts index 5079f64..c6f1c17 100644 --- a/src/ssn/decryption/decryptChunk.ts +++ b/src/ssn/decryption/decryptChunk.ts @@ -10,10 +10,7 @@ export default function decryptChunk(encryptedChunk: Buffer, [key0, key1, key2]: const keyPart = (key2 | 2) & 0xFFFF; const decryptedByte = (keyPart * (keyPart ^ 1)) >>> 8; curChar ^= decryptedByte & 0xFF; - //Skip the first 12 bytes (random encryption header) - if (i >= 12) { - dvOut.setUint8(i - 12, curChar); - } + dvOut.setUint8(i, curChar); //update keys [key0, key1, key2] = updateKeys([key0, key1, key2], curChar);