pkcs7Unpad

fun pkcs7Unpad(data: ByteArray, blockSize: Int = 16): ByteArray

Remove PKCS#7 padding from data.

Throws

if the padding is absent or malformed, matching pywidevine's Padding.unpad. Returning the input unchanged would hand back a failed decrypt as if it were a content key.