Open afriza opened 2 months ago
Above code is PCKS7 (PCKS#7) padding. If the buf is not 16-byte alignment, then fill the remaining bytes with the remaining number of bytes.
It seems like old Apple docs mentioned that there is no padding
No, I don't think the padding mentioned in above apple doc is the padding the AES encryption. For AES, the encrypting buf must be the aligned with the number of bytes of the secrete key, that's why there are PCKS7 method to let the buf aligned with the number of bytes of secrete key.
Hello, I am wondering if SRS' support for HLS AES-128 encryption uses PKCS7 padding ?
My understanding from quickly checking the code is that it does not use PKCS7 padding?
https://github.com/ossrs/srs/blob/d70e7357cfe5b34eb8e8dd30723d07f4bdd48b24/trunk/src/kernel/srs_kernel_ts.cpp#L2802-L2810
https://github.com/ossrs/srs/blob/d70e7357cfe5b34eb8e8dd30723d07f4bdd48b24/trunk/src/kernel/srs_kernel_ts.cpp#L2775
It seems like old Apple docs mentioned that there is no padding.. But RFC8216 mentions PCKS7 padding..
I am requesting PKCS7 padding to be added for compatibility with ExoPlayer on Android..