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