Shaka Packager SDK
sample_aes_ec3_cryptor.h
1 // Copyright 2018 Google LLC. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file or at
5 // https://developers.google.com/open-source/licenses/bsd
6 
7 #ifndef PACKAGER_MEDIA_CRYPTO_SAMPLE_AES_EC3_CRYPTOR_H_
8 #define PACKAGER_MEDIA_CRYPTO_SAMPLE_AES_EC3_CRYPTOR_H_
9 
10 #include <packager/media/base/aes_cryptor.h>
11 
12 namespace shaka {
13 namespace media {
14 
18  public:
22  explicit SampleAesEc3Cryptor(std::unique_ptr<AesCryptor> cryptor);
23 
26  bool InitializeWithIv(const std::vector<uint8_t>& key,
27  const std::vector<uint8_t>& iv) override;
29 
30  private:
32  SampleAesEc3Cryptor& operator=(const SampleAesEc3Cryptor&) = delete;
33 
34  // AesCryptor implementation overrides.
35  bool CryptInternal(const uint8_t* text,
36  size_t text_size,
37  uint8_t* crypt_text,
38  size_t* crypt_text_size) override;
39  void SetIvInternal() override;
40 
41  std::unique_ptr<AesCryptor> cryptor_;
42 };
43 
44 } // namespace media
45 } // namespace shaka
46 
47 #endif // PACKAGER_MEDIA_CRYPTO_SAMPLE_AES_EC3_CRYPTOR_H_
const std::vector< uint8_t > & iv() const
Definition: aes_cryptor.h:85
SampleAesEc3Cryptor(std::unique_ptr< AesCryptor > cryptor)
bool InitializeWithIv(const std::vector< uint8_t > &key, const std::vector< uint8_t > &iv) override
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66