Shaka Packager SDK
Loading...
Searching...
No Matches
aes_encryptor_factory.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_AES_ENCRYPTOR_FACTORY_H_
8#define PACKAGER_MEDIA_CRYPTO_AES_ENCRYPTOR_FACTORY_H_
9
10#include <packager/media/base/fourccs.h>
11#include <packager/media/base/stream_info.h>
12
13namespace shaka {
14namespace media {
15
16class AesCryptor;
17
20 public:
21 AesEncryptorFactory() = default;
22 virtual ~AesEncryptorFactory() = default;
23
24 // Virtual for mocking.
25 virtual std::unique_ptr<AesCryptor> CreateEncryptor(
26 FourCC protection_scheme,
27 uint8_t crypt_byte_block,
28 uint8_t skip_byte_block,
29 Codec codec,
30 const std::vector<uint8_t>& key,
31 const std::vector<uint8_t>& iv);
32
33 private:
35 AesEncryptorFactory& operator=(const AesEncryptorFactory&) = delete;
36};
37
38} // namespace media
39} // namespace shaka
40
41#endif // PACKAGER_MEDIA_CRYPTO_AES_ENCRYPTOR_FACTORY_H_
A factory class to create encryptors.
All the methods that are virtual are virtual for mocking.