IDvrEncryptionInfo, com.wowza.wms.httpstreamer.util.IEncryptionInfo, Cloneablepublic class CencInfo extends Object implements IDvrEncryptionInfo, com.wowza.wms.httpstreamer.util.IEncryptionInfo
| Modifier and Type | Field | Description |
|---|---|---|
static int |
ALGORITHMID_CBC |
|
static int |
ALGORITHMID_CTR |
|
static int |
ALGORITHMID_NONE |
|
static int |
KEY_ROTATION_TYPE_EXTERNAL |
|
static int |
KEY_ROTATION_TYPE_INTERNAL_RANDOM |
|
static int |
KEY_ROTATION_TYPE_INTERNAL_STATIC |
|
static int |
KEY_ROTATION_TYPE_NONE |
|
static int |
PSSH_VERSION_0 |
|
static int |
PSSH_VERSION_1 |
ENCRYPTION_TYPE_CENC, ENCRYPTION_TYPE_CUPERTINO, ENCRYPTION_TYPE_PLAYREADY| Constructor | Description |
|---|---|
CencInfo() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addDRM(String hashKey,
ICencDRMInfo drm) |
Adds a DRM system info instance to the list of DRM systems associated with the stream encryption.
|
Object |
clone() |
|
static CencInfo |
deserialize(byte[] data) |
|
static CencInfo |
deserialize(java.nio.ByteBuffer buffer) |
|
static String |
formatKID(String KID) |
|
String |
generateRandomKID() |
|
int |
getAlgorithm() |
|
String |
getAlgorithmString() |
|
String |
getCencMp4ProtSchemeString() |
|
String |
getCencMpegTsProtSchemeString() |
|
java.util.Map<String,ICencDRMInfo> |
getDRMs() |
|
byte[] |
getEncIVBytes() |
|
byte[] |
getEncKeyBytes() |
|
java.util.List<byte[]> |
getEncKeyBytesList() |
|
String |
getEncKeyString() |
|
byte[] |
getEncRepeaterBytes() |
|
int |
getEncryptionType() |
Serialize encryption info.
|
boolean |
getIsRotatingKeys() |
|
java.util.Map<Integer,com.wowza.wms.drm.cenc.CencInfo.KeyPair> |
getKeyPairs() |
|
int |
getKeyRotationType() |
|
String |
getKID() |
|
byte[] |
getKIDBytes() |
|
byte[] |
getKIDBytesSwapped() |
|
java.util.List<byte[]> |
getKIDsBytesList() |
|
java.util.List<byte[]> |
getKIDsBytesListSwapped() |
|
java.util.List<String> |
getKIDsList() |
|
String |
getNameSpaceString() |
|
int |
getPSSHFlags() |
|
int |
getPSSHVersion() |
|
int |
getSerializeSize() |
Return number of bytes required to serialize this encryption info.
|
boolean |
isValid() |
|
static boolean |
loadFromKeyFile(IApplicationInstance appInstance,
String streamName,
CencInfo cencInfo,
long chunkId,
int contentType,
int chunkDurationTarget,
String keyFileParamPrefix) |
|
byte[] |
serialize() |
Serialize the encryption info, returning a byte buffer containing the serialized data.
|
int |
serialize(byte[] buffer,
int pos) |
Serialize the encryption info into buffer starting at position 'pos'.
|
void |
setAlgorithm(int algorithm) |
Sets the encryption algorithm to be used.
|
void |
setAppInstance(IApplicationInstance appInstance) |
|
void |
setEncKeyBytes(byte[] keyBytes) |
Sets the encryption content key as a byte buffer.
|
void |
setEncKeyBytesList(java.util.List<byte[]> keyBytesList) |
|
void |
setEncRepeaterBytes(byte[] encRepeaterBytes) |
|
void |
setIVBytes(byte[] encIVBytes) |
|
void |
setKeyPairs(java.util.Map<Integer,com.wowza.wms.drm.cenc.CencInfo.KeyPair> keyPairs) |
|
void |
setKeyRotationInterval(int interval) |
|
void |
setKeyRotationType(int keyRotationType) |
|
void |
setKID(byte[] KIDbytes) |
Sets the encryption key id.
|
void |
setKID(String KID) |
Sets the encryption key id.
|
void |
setKIDsList(java.util.List<String> KIDList) |
Sets the list of encryption key id strings.
|
void |
setPSSHFlags(int psshFlags) |
|
void |
setPSSHVersion(int psshVersion) |
|
static byte[] |
swapKIDBytes(byte[] KID) |
|
String |
toString() |
|
void |
updateKey(long chunkId,
int chunkDurationTarget) |
public static final int ALGORITHMID_CBC
public static final int ALGORITHMID_CTR
public static final int ALGORITHMID_NONE
public static final int KEY_ROTATION_TYPE_EXTERNAL
public static final int KEY_ROTATION_TYPE_INTERNAL_RANDOM
public static final int KEY_ROTATION_TYPE_INTERNAL_STATIC
public static final int KEY_ROTATION_TYPE_NONE
public static final int PSSH_VERSION_0
public static final int PSSH_VERSION_1
public void addDRM(String hashKey,
ICencDRMInfo drm)
Example hashKey: "myDRM:12345678-1234-1234-1234-123456789123"
hashKey - hash keydrm - the drm info instancepublic Object clone()
throws CloneNotSupportedException
clone in interface IDvrEncryptionInfoclone in class ObjectCloneNotSupportedExceptionpublic static CencInfo deserialize(byte[] data)
public static CencInfo deserialize(java.nio.ByteBuffer buffer)
public static String formatKID(String KID)
public String generateRandomKID()
public int getAlgorithm()
public String getAlgorithmString()
public String getCencMp4ProtSchemeString()
public String getCencMpegTsProtSchemeString()
public java.util.Map<String,ICencDRMInfo> getDRMs()
public byte[] getEncIVBytes()
getEncIVBytes in interface com.wowza.wms.httpstreamer.util.IEncryptionInfopublic byte[] getEncKeyBytes()
getEncKeyBytes in interface com.wowza.wms.httpstreamer.util.IEncryptionInfopublic java.util.List<byte[]> getEncKeyBytesList()
public String getEncKeyString()
public byte[] getEncRepeaterBytes()
public int getEncryptionType()
IDvrEncryptionInfoThe encryption should consist of the following:
getEncryptionType in interface IDvrEncryptionInfopublic boolean getIsRotatingKeys()
public java.util.Map<Integer,com.wowza.wms.drm.cenc.CencInfo.KeyPair> getKeyPairs()
public int getKeyRotationType()
public String getKID()
public byte[] getKIDBytes()
public byte[] getKIDBytesSwapped()
public java.util.List<byte[]> getKIDsBytesList()
public java.util.List<byte[]> getKIDsBytesListSwapped()
public java.util.List<String> getKIDsList()
public String getNameSpaceString()
public int getPSSHFlags()
public int getPSSHVersion()
public int getSerializeSize()
IDvrEncryptionInfogetSerializeSize in interface IDvrEncryptionInfopublic boolean isValid()
public static boolean loadFromKeyFile(IApplicationInstance appInstance, String streamName, CencInfo cencInfo, long chunkId, int contentType, int chunkDurationTarget, String keyFileParamPrefix)
public byte[] serialize()
IDvrEncryptionInfoserialize in interface IDvrEncryptionInfopublic int serialize(byte[] buffer,
int pos)
IDvrEncryptionInfoserialize in interface IDvrEncryptionInfobuffer - buffer to serialize topos - position to start serializingpublic void setAlgorithm(int algorithm)
algorithm - encryption algorithmpublic void setAppInstance(IApplicationInstance appInstance)
public void setEncKeyBytes(byte[] keyBytes)
keyBytes - the encryption content key as a byte bufferpublic void setEncKeyBytesList(java.util.List<byte[]> keyBytesList)
public void setEncRepeaterBytes(byte[] encRepeaterBytes)
public void setIVBytes(byte[] encIVBytes)
public void setKeyPairs(java.util.Map<Integer,com.wowza.wms.drm.cenc.CencInfo.KeyPair> keyPairs)
public void setKeyRotationInterval(int interval)
public void setKeyRotationType(int keyRotationType)
public void setKID(byte[] KIDbytes)
KIDbytes - key id byte arraypublic void setKID(String KID)
KID - key idpublic void setKIDsList(java.util.List<String> KIDList)
KIDList - list of key id stringspublic void setPSSHFlags(int psshFlags)
public void setPSSHVersion(int psshVersion)
public static byte[] swapKIDBytes(byte[] KID)
public String toString()
toString in class Objectpublic void updateKey(long chunkId,
int chunkDurationTarget)