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