proxygen
fizz::MockKeyDerivation Class Reference

#include <Mocks.h>

Inheritance diagram for fizz::MockKeyDerivation:
fizz::KeyDerivation

Public Member Functions

 MOCK_CONST_METHOD0 (hashLength, size_t())
 
 MOCK_CONST_METHOD0 (blankHash, folly::ByteRange())
 
 MOCK_METHOD4 (_expandLabel, Buf(folly::ByteRange secret, folly::StringPiece label, Buf &hashValue, uint16_t length))
 
 MOCK_METHOD3 (_hkdfExpand, Buf(folly::ByteRange secret, Buf &info, uint16_t length))
 
Buf expandLabel (folly::ByteRange secret, folly::StringPiece label, Buf hashValue, uint16_t length) override
 
Buf hkdfExpand (folly::ByteRange secret, Buf info, uint16_t length) override
 
 MOCK_METHOD3 (deriveSecret, std::vector< uint8_t >(folly::ByteRange secret, folly::StringPiece label, folly::ByteRange messageHash))
 
 MOCK_METHOD2 (hkdfExtract, std::vector< uint8_t >(folly::ByteRange salt, folly::ByteRange ikm))
 
 MOCK_METHOD2 (hash, void(const folly::IOBuf &in, folly::MutableByteRange out))
 
 MOCK_METHOD3 (hmac, void(folly::ByteRange key, const folly::IOBuf &in, folly::MutableByteRange out))
 
- Public Member Functions inherited from fizz::KeyDerivation
virtual ~KeyDerivation ()=default
 
virtual size_t hashLength () const =0
 
virtual folly::ByteRange blankHash () const =0
 
virtual std::vector< uint8_tderiveSecret (folly::ByteRange secret, folly::StringPiece label, folly::ByteRange messageHash)=0
 
virtual std::vector< uint8_thkdfExtract (folly::ByteRange salt, folly::ByteRange ikm)=0
 
virtual void hash (const folly::IOBuf &in, folly::MutableByteRange out)=0
 
virtual void hmac (folly::ByteRange key, const folly::IOBuf &in, folly::MutableByteRange out)=0
 

Detailed Description

Definition at line 17 of file Mocks.h.

Member Function Documentation

Buf fizz::MockKeyDerivation::expandLabel ( folly::ByteRange  secret,
folly::StringPiece  label,
Buf  hashValue,
uint16_t  length 
)
inlineoverridevirtual

Implements fizz::KeyDerivation.

Definition at line 30 of file Mocks.h.

34  {
35  return _expandLabel(secret, label, hashValue, length);
36  }
Buf fizz::MockKeyDerivation::hkdfExpand ( folly::ByteRange  secret,
Buf  info,
uint16_t  length 
)
inlineoverridevirtual

Performs HDKF expansion.

Implements fizz::KeyDerivation.

Definition at line 37 of file Mocks.h.

References fizz::KeyDerivation::deriveSecret(), fizz::KeyDerivation::hash(), fizz::KeyDerivation::hkdfExtract(), fizz::KeyDerivation::hmac(), MOCK_METHOD2(), and MOCK_METHOD3().

37  {
38  return _hkdfExpand(secret, info, length);
39  }
def info()
Definition: deadlock.py:447
fizz::MockKeyDerivation::MOCK_CONST_METHOD0 ( hashLength  ,
size_t()   
)
fizz::MockKeyDerivation::MOCK_CONST_METHOD0 ( blankHash  ,
folly::ByteRange()   
)
fizz::MockKeyDerivation::MOCK_METHOD2 ( hkdfExtract  ,
std::vector< uint8_t folly::ByteRange salt, folly::ByteRange ikm 
)

Referenced by hkdfExpand().

fizz::MockKeyDerivation::MOCK_METHOD2 ( hash  ,
void(const folly::IOBuf &in, folly::MutableByteRange out)   
)
fizz::MockKeyDerivation::MOCK_METHOD3 ( _hkdfExpand  ,
Buf(folly::ByteRange secret, Buf &info, uint16_t length)   
)

Referenced by hkdfExpand().

fizz::MockKeyDerivation::MOCK_METHOD3 ( deriveSecret  ,
std::vector< uint8_t folly::ByteRange secret, folly::StringPiece label, folly::ByteRange messageHash 
)
fizz::MockKeyDerivation::MOCK_METHOD3 ( hmac  ,
void(folly::ByteRange key, const folly::IOBuf &in, folly::MutableByteRange out)   
)
fizz::MockKeyDerivation::MOCK_METHOD4 ( _expandLabel  ,
Buf(folly::ByteRange secret, folly::StringPiece label, Buf &hashValue, uint16_t length)   
)

The documentation for this class was generated from the following file: