public static final class MediaCodec.CryptoInfo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MediaCodec.CryptoInfo.Pattern
Metadata describing an encryption pattern for the protected bytes in
a subsample.
|
Modifier and Type | Field and Description |
---|---|
byte[] |
iv
A 16-byte initialization vector
|
byte[] |
key
A 16-byte key id
|
int |
mode
The type of encryption that has been applied,
see
MediaCodec.CRYPTO_MODE_UNENCRYPTED , MediaCodec.CRYPTO_MODE_AES_CTR
and MediaCodec.CRYPTO_MODE_AES_CBC |
int[] |
numBytesOfClearData
The number of leading unencrypted bytes in each subSample.
|
int[] |
numBytesOfEncryptedData
The number of trailing encrypted bytes in each subSample.
|
int |
numSubSamples
The number of subSamples that make up the buffer's contents.
|
Constructor and Description |
---|
CryptoInfo() |
Modifier and Type | Method and Description |
---|---|
void |
set(int newNumSubSamples,
int[] newNumBytesOfClearData,
int[] newNumBytesOfEncryptedData,
byte[] newKey,
byte[] newIV,
int newMode)
Set the subsample count, clear/encrypted sizes, key, IV and mode fields of
a
MediaCodec.CryptoInfo instance. |
void |
setPattern(MediaCodec.CryptoInfo.Pattern newPattern)
Set the encryption pattern on a
MediaCodec.CryptoInfo instance. |
String |
toString()
Returns a string representation of the object.
|
public int numSubSamples
public int[] numBytesOfClearData
public int[] numBytesOfEncryptedData
public byte[] key
public byte[] iv
public int mode
MediaCodec.CRYPTO_MODE_UNENCRYPTED
, MediaCodec.CRYPTO_MODE_AES_CTR
and MediaCodec.CRYPTO_MODE_AES_CBC
public void set(int newNumSubSamples, int[] newNumBytesOfClearData, int[] newNumBytesOfEncryptedData, byte[] newKey, byte[] newIV, int newMode)
MediaCodec.CryptoInfo
instance.public void setPattern(MediaCodec.CryptoInfo.Pattern newPattern)
MediaCodec.CryptoInfo
instance.
See MediaCodec.CryptoInfo.Pattern
.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())