proxygen
Signature.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 <fizz/record/Types.h>
12 #include <folly/Range.h>
14 
15 namespace fizz {
16 
17 enum class KeyType { RSA, P256, P384, P521 };
18 
22 template <KeyType T>
24  public:
25  void setKey(folly::ssl::EvpPkeyUniquePtr pkey);
26 
34  template <SignatureScheme Scheme>
35  std::unique_ptr<folly::IOBuf> sign(folly::ByteRange data) const;
36 
44  template <SignatureScheme Scheme>
45  void verify(folly::ByteRange data, folly::ByteRange signature) const;
46 
47  private:
49 };
50 } // namespace fizz
51 
void verify(int extras)
std::unique_ptr< EVP_PKEY, EvpPkeyDeleter > EvpPkeyUniquePtr
KeyType
Definition: Signature.h:17
Definition: Actions.h:16
folly::ssl::EvpPkeyUniquePtr pkey_
Definition: Signature.h:48
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43