CryptoInfo
@UnstableApi
class CryptoInfo
Metadata describing the structure of an encrypted input sample.
This class is a compatibility wrapper for android.media.MediaCodec.CryptoInfo.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
increaseClearDataFirstSubSampleBy(count: Int)Increases the number of clear data for the first sub sample by |
Unit |
Public properties |
|
|---|---|
Int |
|
Int |
|
MediaCodec.CryptoInfo! |
|
Array<Byte>? |
The 16 byte initialization vector. |
Array<Byte>? |
The 16 byte key id. |
Int |
The type of encryption that has been applied. |
Array<Int>? |
The number of leading unencrypted bytes in each sub-sample. |
Array<Int>? |
The number of trailing encrypted bytes in each sub-sample. |
Int |
The number of subSamples that make up the buffer's contents. |
Public constructors
Public functions
increaseClearDataFirstSubSampleBy
fun increaseClearDataFirstSubSampleBy(count: Int): Unit
Increases the number of clear data for the first sub sample by count.
If count is 0, this method is a no-op. Otherwise, it adds count to numBytesOfClearData[0].
If numBytesOfClearData is null (which is permitted), this method will instantiate it to a new int[1].
| Parameters | |
|---|---|
count: Int |
The number of bytes to be added to the first subSample of |
Public properties
iv
val iv: Array<Byte>?
The 16 byte initialization vector. If the initialization vector of the content is shorter than 16 bytes, 0 byte padding is appended to extend the vector to the required 16 byte length.
| See also | |
|---|---|
iv |
mode
@C.CryptoMode
val mode: Int
The type of encryption that has been applied. Must be one of the C.CryptoMode values.
| See also | |
|---|---|
mode |
numBytesOfClearData
val numBytesOfClearData: Array<Int>?
The number of leading unencrypted bytes in each sub-sample. If null, all bytes are treated as encrypted and numBytesOfEncryptedData must be specified.
| See also | |
|---|---|
numBytesOfClearData |
numBytesOfEncryptedData
val numBytesOfEncryptedData: Array<Int>?
The number of trailing encrypted bytes in each sub-sample. If null, all bytes are treated as clear and numBytesOfClearData must be specified.
| See also | |
|---|---|
numBytesOfEncryptedData |
numSubSamples
val numSubSamples: Int
The number of subSamples that make up the buffer's contents.
| See also | |
|---|---|
numSubSamples |