From beb2d351dac7fb3b157261d90c79cdb6226af46e Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 24 Jun 2018 00:56:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Minor=20code=20quality=20improve?= =?UTF-8?q?ment=20in=20decryptFile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/decryption/decryptFile.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ssn/decryption/decryptFile.ts b/src/ssn/decryption/decryptFile.ts index 69f8d36..3ece721 100644 --- a/src/ssn/decryption/decryptFile.ts +++ b/src/ssn/decryption/decryptFile.ts @@ -12,6 +12,7 @@ export default function decryptFile(dv: DataView, length: number, [key0, key1, k //update keys [key0, key1, key2] = updateKeys([key0, key1, key2], curChar); } - //if it was decrypted, we skip the first 12 bytes (random encryption header) - return new DataView(dv.buffer, 12); + + //If it was decrypted, we skip the first 12 bytes (random encryption header) + return new DataView(dv.buffer, 12, dv.byteLength - 12); }