🎨 Minor code quality improvement in decryptFile

This commit is contained in:
C-3PO 2018-06-24 00:56:14 +02:00
parent a2044887e8
commit beb2d351da
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -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);
}