proxygen
Mocks.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <gmock/gmock.h>
12 
14 
15 namespace fizz {
16 
18  public:
19  MOCK_CONST_METHOD0(hashLength, size_t());
22  _expandLabel,
25  Buf& hashValue,
26  uint16_t length));
28  _hkdfExpand,
29  Buf(folly::ByteRange secret, Buf& info, uint16_t length));
31  folly::ByteRange secret,
32  folly::StringPiece label,
33  Buf hashValue,
34  uint16_t length) override {
35  return _expandLabel(secret, label, hashValue, length);
36  }
37  Buf hkdfExpand(folly::ByteRange secret, Buf info, uint16_t length) override {
38  return _hkdfExpand(secret, info, length);
39  }
42  std::vector<uint8_t>(
43  folly::ByteRange secret,
44  folly::StringPiece label,
45  folly::ByteRange messageHash));
48  std::vector<uint8_t>(folly::ByteRange salt, folly::ByteRange ikm));
51  hmac,
52  void(
53  folly::ByteRange key,
54  const folly::IOBuf& in,
56 };
57 
58 } // namespace fizz
virtual size_t hashLength() const =0
def info()
Definition: deadlock.py:447
MOCK_METHOD2(hkdfExtract, std::vector< uint8_t >(folly::ByteRange salt, folly::ByteRange ikm))
MOCK_METHOD3(_hkdfExpand, Buf(folly::ByteRange secret, Buf &info, uint16_t length))
Buf hkdfExpand(folly::ByteRange secret, Buf info, uint16_t length) override
Definition: Mocks.h:37
virtual void hmac(folly::ByteRange key, const folly::IOBuf &in, folly::MutableByteRange out)=0
Definition: Actions.h:16
virtual folly::ByteRange blankHash() const =0
virtual std::vector< uint8_t > hkdfExtract(folly::ByteRange salt, folly::ByteRange ikm)=0
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
virtual void hash(const folly::IOBuf &in, folly::MutableByteRange out)=0
static constexpr StringPiece secret
MOCK_CONST_METHOD0(hashLength, size_t())
MOCK_METHOD4(_expandLabel, Buf(folly::ByteRange secret, folly::StringPiece label, Buf &hashValue, uint16_t length))
virtual std::vector< uint8_t > deriveSecret(folly::ByteRange secret, folly::StringPiece label, folly::ByteRange messageHash)=0
Buf expandLabel(folly::ByteRange secret, folly::StringPiece label, Buf hashValue, uint16_t length) override
Definition: Mocks.h:30
StringPiece label