Shaka Packager SDK
|
Encryption parameters. More...
#include <crypto_params.h>
Classes | |
struct | EncryptedStreamAttributes |
Encrypted stream information that is used to determine stream label. More... | |
Public Attributes | |
KeyProvider | key_provider = KeyProvider::kNone |
WidevineEncryptionParams | widevine |
PlayReadyEncryptionParams | playready |
RawKeyParams | raw_key |
ProtectionSystem | protection_systems |
The protection systems to generate, multiple can be OR'd together. | |
std::string | playready_extra_header_data |
Extra XML data to add to PlayReady data. | |
double | clear_lead_in_seconds = 0 |
Clear lead duration in seconds. | |
uint32_t | protection_scheme = kProtectionSchemeCenc |
uint8_t | crypt_byte_block = 1 |
uint8_t | skip_byte_block = 9 |
double | crypto_period_duration_in_seconds = kNoKeyRotation |
bool | vp9_subsample_encryption = true |
Enable/disable subsample encryption for VP9. | |
std::function< std::string(const EncryptedStreamAttributes &stream_attributes)> | stream_label_func |
Static Public Attributes | |
static constexpr uint32_t | kProtectionSchemeCenc = 0x63656E63 |
The protection scheme: "cenc", "cens", "cbc1", "cbcs". | |
static constexpr uint32_t | kProtectionSchemeCbc1 = 0x63626331 |
static constexpr uint32_t | kProtectionSchemeCens = 0x63656E73 |
static constexpr uint32_t | kProtectionSchemeCbcs = 0x63626373 |
static constexpr double | kNoKeyRotation = 0 |
Encryption parameters.
Definition at line 146 of file crypto_params.h.
uint8_t shaka::EncryptionParams::crypt_byte_block = 1 |
The count of the encrypted blocks in the protection pattern, where each block is of size 16-bytes. There are three common patterns (crypt_byte_block:skip_byte_block): 1:9 (default), 5:5, 10:0. Applies to video streams with "cbcs" and "cens" protection schemes only; Ignored otherwise.
Definition at line 174 of file crypto_params.h.
KeyProvider shaka::EncryptionParams::key_provider = KeyProvider::kNone |
Specifies the key provider, which determines which key provider is used and which encryption params is valid. 'kNone' means not to encrypt the streams.
Definition at line 150 of file crypto_params.h.
|
staticconstexpr |
Crypto period duration in seconds. A positive value means key rotation is enabled, the key provider must support key rotation in this case.
Definition at line 181 of file crypto_params.h.
uint8_t shaka::EncryptionParams::skip_byte_block = 9 |
The count of the unencrypted blocks in the protection pattern. Applies to video streams with "cbcs" and "cens" protection schemes only; Ignored otherwise.
Definition at line 178 of file crypto_params.h.
std::function<std::string(const EncryptedStreamAttributes& stream_attributes)> shaka::EncryptionParams::stream_label_func |
Stream label function assigns a stream label to the stream to be encrypted. Stream label is used to associate KeyPair with streams. Streams with the same stream label always uses the same keyPair; Streams with different stream label could use the same or different KeyPairs. A default stream label function will be generated if not set.
Definition at line 216 of file crypto_params.h.