proxygen
KeyExchange.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 <folly/Range.h>
12 #include <folly/io/IOBuf.h>
13 
14 namespace fizz {
15 
19 class KeyExchange {
20  public:
21  virtual ~KeyExchange() = default;
22 
26  virtual void generateKeyPair() = 0;
27 
33  virtual std::unique_ptr<folly::IOBuf> getKeyShare() const = 0;
34 
43  virtual std::unique_ptr<folly::IOBuf> generateSharedSecret(
44  folly::ByteRange keyShare) const = 0;
45 };
46 } // namespace fizz
virtual ~KeyExchange()=default
virtual std::unique_ptr< folly::IOBuf > getKeyShare() const =0
Definition: Actions.h:16
virtual std::unique_ptr< folly::IOBuf > generateSharedSecret(folly::ByteRange keyShare) const =0
virtual void generateKeyPair()=0