DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Attributes | List of all members
shaka::media::DecryptConfig Class Reference

#include <decrypt_config.h>

Public Member Functions

 DecryptConfig (const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< SubsampleEntry > &subsamples)
 
 DecryptConfig (const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv, const std::vector< SubsampleEntry > &subsamples, FourCC protection_scheme, uint8_t crypt_byte_block, uint8_t skip_byte_block)
 
const std::vector< uint8_t > & key_id () const
 
const std::vector< uint8_t > & iv () const
 
const std::vector
< SubsampleEntry > & 
subsamples () const
 
FourCC protection_scheme () const
 
uint8_t crypt_byte_block () const
 
uint8_t skip_byte_block () const
 

Static Public Attributes

static const size_t kDecryptionKeySize = 16
 Keys are always 128 bits.
 

Detailed Description

Contains all the information that a decryptor needs to decrypt a media sample.

Definition at line 40 of file decrypt_config.h.

Constructor & Destructor Documentation

shaka::media::DecryptConfig::DecryptConfig ( const std::vector< uint8_t > &  key_id,
const std::vector< uint8_t > &  iv,
const std::vector< SubsampleEntry > &  subsamples 
)

Create a 'cenc' decrypt config.

Parameters
key_idis the ID that references the decryption key.
ivis the initialization vector defined by the encryptor.
subsamplesdefines the clear and encrypted portions of the sample as described in SubsampleEntry. A decrypted buffer will be equal in size to the sum of the subsample sizes.

Definition at line 12 of file decrypt_config.cc.

shaka::media::DecryptConfig::DecryptConfig ( const std::vector< uint8_t > &  key_id,
const std::vector< uint8_t > &  iv,
const std::vector< SubsampleEntry > &  subsamples,
FourCC  protection_scheme,
uint8_t  crypt_byte_block,
uint8_t  skip_byte_block 
)

Create a general decrypt config with possible pattern-based encryption.

Parameters
key_idis the ID that references the decryption key.
ivis the initialization vector defined by the encryptor.
subsamplesdefines the clear and encrypted portions of the sample as described in SubsampleEntry. A decrypted buffer will be equal in size to the sum of the subsample sizes.
protection_schemespecifies the protection scheme: 'cenc', 'cens', 'cbc1', 'cbcs'.
crypt_byte_blockindicates number of encrypted blocks (16-byte) in pattern based encryption, 'cens' and 'cbcs'. Ignored otherwise.
skip_byte_blockindicates number of unencrypted blocks (16-byte) in pattern based encryption, 'cens' and 'cbcs'. Ignored otherwise.

Definition at line 17 of file decrypt_config.cc.


The documentation for this class was generated from the following files: