Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ object M3u8Helper2 {
}

@OptIn(DelicateCryptographyApi::class)
fun getDecrypted(
suspend fun getDecrypted(
Comment thread
Luna712 marked this conversation as resolved.
Outdated
secretKey: ByteArray,
data: ByteArray,
iv: ByteArray = byteArrayOf(),
index: Int,
): ByteArray {
val ivKey = if (iv.isEmpty()) defaultIv(index) else iv
val aesKey = aesCbc.keyDecoder().decodeFromByteArrayBlocking(AES.Key.Format.RAW, secretKey)
return aesKey.cipher(padding = true).decryptWithIvBlocking(ivKey, data)
val aesKey = aesCbc.keyDecoder().decodeFromByteArray(AES.Key.Format.RAW, secretKey)
return aesKey.cipher(padding = true).decryptWithIv(ivKey, data)
}

private fun getParentLink(url: String): String {
Expand Down