Shaka Packager SDK
Loading...
Searching...
No Matches
packager
media
base
mock_aes_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_BASE_MOCK_AES_CRYPTOR_H_
8
#define PACKAGER_MEDIA_BASE_MOCK_AES_CRYPTOR_H_
9
10
#include <cstddef>
11
#include <cstdint>
12
#include <vector>
13
14
#include <gmock/gmock.h>
15
16
#include <packager/media/base/aes_cryptor.h>
17
18
namespace
shaka
{
19
namespace
media {
20
21
class
MockAesCryptor
:
public
AesCryptor
{
22
public
:
23
MockAesCryptor
() :
AesCryptor
(kDontUseConstantIv) {}
24
25
MOCK_METHOD2(
InitializeWithIv
,
26
bool
(
const
std::vector<uint8_t>& key,
27
const
std::vector<uint8_t>&
iv
));
28
MOCK_METHOD4(CryptInternal,
29
bool
(
const
uint8_t* text,
30
size_t
text_size,
31
uint8_t* crypt_text,
32
size_t
* crypt_text_size));
33
MOCK_METHOD0(SetIvInternal,
void
());
34
};
35
36
}
// namespace media
37
}
// namespace shaka
38
39
#endif
// PACKAGER_MEDIA_BASE_MOCK_AES_CRYPTOR_H_
shaka::media::AesCryptor
Definition
aes_cryptor.h:25
shaka::media::AesCryptor::InitializeWithIv
virtual bool InitializeWithIv(const std::vector< uint8_t > &key, const std::vector< uint8_t > &iv)=0
shaka::media::AesCryptor::iv
const std::vector< uint8_t > & iv() const
Definition
aes_cryptor.h:86
shaka::media::MockAesCryptor
Definition
mock_aes_cryptor.h:21
shaka
All the methods that are virtual are virtual for mocking.
Definition
cpix_encryption_flags.cc:51
Generated on Mon Jul 27 2026 18:29:59 for Shaka Packager SDK by
1.9.8