This commit is contained in:
sunmisc
2024-02-05 18:28:28 +03:00
parent d9300fc621
commit dab50535ef
@@ -97,6 +97,8 @@ public class M3UDownloader
byte[] total = new byte[0];
int size = segments.size();
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
for (var segment : segments) {
var buff = IOUtils.readFully(IOUtils.openStream(baseUri + segment.a/*url*/));
if (!TextUtils.isEmpty(segment.g)) {
@@ -105,9 +107,6 @@ public class M3UDownloader
//if IV doesn't pass, it must be created manually
if (cipherBytes.length != 16)
cipherBytes = new byte[16];
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
var cipherIv = new IvParameterSpec(cipherBytes);
cipher.init(Cipher.DECRYPT_MODE, cipherKey, cipherIv);
buff = cipher.doFinal(buff);