From 1d1b8930cf7b18eaf0922754d4296886a057f45f Mon Sep 17 00:00:00 2001 From: C-3PO Date: Thu, 5 Jul 2018 02:35:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fix=20chunk=20decryption?= 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 7966e81..b41ca26 100644 --- a/src/ssn/decryption/decryptChunk.ts +++ b/src/ssn/decryption/decryptChunk.ts @@ -6,7 +6,7 @@ export default function decryptChunk(encryptedChunk: Buffer, [key0, key1, key2]: const decryptedChunk = new Buffer(encryptedChunk.length); const dvOut = new DataView(decryptedChunk.buffer); - for (let i = 0; i < length; i += 1) { + for (let i = 0; i < encryptedChunk.length; i += 1) { //read and decrypt byte let curChar = dv.getUint8(i); const keyPart = (key2 | 2) & 0xFFFF;