Android Studio Sign in

@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

Increases the number of clear data for the first sub sample by count.

Unit
set(
    numSubSamples: Int,
    numBytesOfClearData: IntArray<Int>!,
    numBytesOfEncryptedData: IntArray<Int>!,
    key: ByteArray<Byte>!,
    iv: ByteArray<Byte>!,
    @C.CryptoMode mode: Int,
    encryptedBlocks: Int,
    clearBlocks: Int
)

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

CryptoInfo

CryptoInfo()

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 numBytesOfClearData.

set

fun set(
    numSubSamples: Int,
    numBytesOfClearData: IntArray<Int>!,
    numBytesOfEncryptedData: IntArray<Int>!,
    key: ByteArray<Byte>!,
    iv: ByteArray<Byte>!,
    @C.CryptoMode mode: Int,
    encryptedBlocks: Int,
    clearBlocks: Int
): Unit
See also
set

Public properties

clearBlocks

val clearBlocksInt

encryptedBlocks

val encryptedBlocksInt

frameworkCryptoInfo

val frameworkCryptoInfoMediaCodec.CryptoInfo!

iv

val ivArray<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

key

val keyArray<Byte>?

The 16 byte key id.

See also
key

mode

@C.CryptoMode
val modeInt

The type of encryption that has been applied. Must be one of the C.CryptoMode values.

See also
mode

numBytesOfClearData

val numBytesOfClearDataArray<Int>?

The number of leading unencrypted bytes in each sub-sample. If null, all bytes are treated as encrypted and numBytesOfEncryptedData must be specified.

numBytesOfEncryptedData

val numBytesOfEncryptedDataArray<Int>?

The number of trailing encrypted bytes in each sub-sample. If null, all bytes are treated as clear and numBytesOfClearData must be specified.

numSubSamples

val numSubSamplesInt

The number of subSamples that make up the buffer's contents.

See also
numSubSamples
Morty Proxy This is a proxified and sanitized view of the page, visit original site.