Shaka Packager SDK
Public Member Functions | List of all members
shaka::media::SampleAesEc3Cryptor Class Reference

#include <sample_aes_ec3_cryptor.h>

Inheritance diagram for shaka::media::SampleAesEc3Cryptor:
shaka::media::AesCryptor

Public Member Functions

 SampleAesEc3Cryptor (std::unique_ptr< AesCryptor > cryptor)
 
AesCryptor implementation overrides.
bool InitializeWithIv (const std::vector< uint8_t > &key, const std::vector< uint8_t > &iv) override
 
- Public Member Functions inherited from shaka::media::AesCryptor
 AesCryptor (ConstantIvFlag constant_iv_flag)
 
virtual size_t RequiredOutputSize (size_t plaintext_size)
 
bool SetIv (const std::vector< uint8_t > &iv)
 
void UpdateIv ()
 
const std::vector< uint8_t > & iv () const
 
bool use_constant_iv () const
 
bool Crypt (const std::vector< uint8_t > &text, std::vector< uint8_t > *crypt_text)
 
bool Crypt (const std::string &text, std::string *crypt_text)
 
bool Crypt (const uint8_t *text, size_t text_size, uint8_t *crypt_text)
 
bool Crypt (const uint8_t *text, size_t text_size, uint8_t *crypt_text, size_t *crypt_text_size)
 

Additional Inherited Members

- Public Types inherited from shaka::media::AesCryptor
enum  ConstantIvFlag { kUseConstantIv , kDontUseConstantIv }
 
- Static Public Member Functions inherited from shaka::media::AesCryptor
static bool GenerateRandomIv (FourCC protection_scheme, std::vector< uint8_t > *iv)
 
- Protected Types inherited from shaka::media::AesCryptor
enum  CipherMode { kCtrMode , kCbcMode }
 
- Protected Member Functions inherited from shaka::media::AesCryptor
bool SetupCipher (size_t key_size, CipherMode mode)
 
- Protected Attributes inherited from shaka::media::AesCryptor
mbedtls_cipher_context_t cipher_ctx_
 

Detailed Description

Implements SAMPLE-AES E-AC3 encryption / decryption per specification at: https://goo.gl/1sgcwY.

Definition at line 17 of file sample_aes_ec3_cryptor.h.

Constructor & Destructor Documentation

◆ SampleAesEc3Cryptor()

shaka::media::SampleAesEc3Cryptor::SampleAesEc3Cryptor ( std::unique_ptr< AesCryptor cryptor)
explicit
Parameters
cryptorpoints to an AesCryptor instance which performs the actual encryption/decryption. Note that cryptor shall not use constant iv.

Definition at line 63 of file sample_aes_ec3_cryptor.cc.

Member Function Documentation

◆ InitializeWithIv()

bool shaka::media::SampleAesEc3Cryptor::InitializeWithIv ( const std::vector< uint8_t > &  key,
const std::vector< uint8_t > &  iv 
)
overridevirtual

Initialize the cryptor with specified key and IV.

Returns
true on successful initialization, false otherwise.

Implements shaka::media::AesCryptor.

Definition at line 69 of file sample_aes_ec3_cryptor.cc.


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