proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
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
>
13
#include <
folly/ssl/OpenSSLPtrTypes.h
>
14
15
namespace
fizz
{
16
17
enum class
KeyType
{
RSA
,
P256
,
P384
,
P521
};
18
22
template
<KeyType T>
23
class
OpenSSLSignature
{
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
:
48
folly::ssl::EvpPkeyUniquePtr
pkey_
;
49
};
50
}
// namespace fizz
51
52
#include <
fizz/crypto/signature/Signature-inl.h
>
Signature-inl.h
verify
void verify(int extras)
Definition:
StlVectorTest.cpp:1475
Types.h
OpenSSLPtrTypes.h
fizz::KeyType::P256
folly::ssl::EvpPkeyUniquePtr
std::unique_ptr< EVP_PKEY, EvpPkeyDeleter > EvpPkeyUniquePtr
Definition:
OpenSSLPtrTypes.h:72
fizz::KeyType
KeyType
Definition:
Signature.h:17
Range.h
fizz
Definition:
Actions.h:16
fizz::OpenSSLSignature::pkey_
folly::ssl::EvpPkeyUniquePtr pkey_
Definition:
Signature.h:48
folly::Range< const unsigned char * >
fizz::OpenSSLSignature
Definition:
Signature.h:23
fizz::KeyType::P384
fizz::P521
Definition:
ECCurve.h:23
fizz::KeyType::RSA
data
static constexpr uint64_t data[1]
Definition:
Fingerprint.cpp:43
proxygen
fizz
fizz
crypto
signature
Signature.h
Generated by
1.8.11