tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mock_frame_encryptor.h (1234B)


      1 /*
      2 *  Copyright 2018 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef API_TEST_MOCK_FRAME_ENCRYPTOR_H_
     12 #define API_TEST_MOCK_FRAME_ENCRYPTOR_H_
     13 
     14 #include <cstddef>
     15 #include <cstdint>
     16 
     17 #include "api/array_view.h"
     18 #include "api/crypto/frame_encryptor_interface.h"
     19 #include "api/media_types.h"
     20 #include "test/gmock.h"
     21 
     22 namespace webrtc {
     23 
     24 class MockFrameEncryptor : public FrameEncryptorInterface {
     25 public:
     26  MOCK_METHOD(int,
     27              Encrypt,
     28              (MediaType,
     29               uint32_t,
     30               ArrayView<const uint8_t>,
     31               ArrayView<const uint8_t>,
     32               ArrayView<uint8_t>,
     33               size_t*),
     34              (override));
     35 
     36  MOCK_METHOD(size_t,
     37              GetMaxCiphertextByteSize,
     38              (MediaType media_type, size_t frame_size),
     39              (override));
     40 };
     41 
     42 }  // namespace webrtc
     43 
     44 #endif  // API_TEST_MOCK_FRAME_ENCRYPTOR_H_