9 #ifndef MEDIA_BASE_AES_ENCRYPTOR_H_
10 #define MEDIA_BASE_AES_ENCRYPTOR_H_
15 #include "packager/base/macros.h"
16 #include "packager/base/memory/scoped_ptr.h"
17 #include "packager/media/base/aes_cryptor.h"
19 namespace edash_packager {
36 const std::vector<uint8_t>&
iv)
override;
48 uint32_t block_offset()
const {
return block_offset_; }
51 bool CryptInternal(
const uint8_t* plaintext,
52 size_t plaintext_size,
54 size_t* ciphertext_size)
override;
55 void SetIvInternal()
override;
58 uint32_t block_offset_;
60 std::vector<uint8_t> counter_;
62 std::vector<uint8_t> encrypted_counter_;
67 enum CbcPaddingScheme {
94 ConstantIvFlag constant_iv_flag);
99 bool CryptInternal(
const uint8_t* plaintext,
100 size_t plaintext_size,
102 size_t* ciphertext_size)
override;
103 void SetIvInternal()
override;
104 size_t NumPaddingBytes(
size_t size)
const override;
106 const CbcPaddingScheme padding_scheme_;
108 std::vector<uint8_t> internal_iv_;
116 #endif // MEDIA_BASE_AES_ENCRYPTOR_H_