proxygen
|
#include <vector>
#include <folly/Benchmark.h>
#include <folly/Random.h>
#include <folly/init/Init.h>
#include <fizz/crypto/Utils.h>
#include <fizz/crypto/aead/AESGCM128.h>
#include <fizz/crypto/aead/AESOCB128.h>
#include <fizz/crypto/aead/OpenSSLEVPCipher.h>
#include <fizz/record/EncryptedRecordLayer.h>
Go to the source code of this file.
Functions | |
std::unique_ptr< folly::IOBuf > | makeRandom (size_t n) |
std::unique_ptr< folly::IOBuf > | toIOBuf (std::string hexData) |
TrafficKey | getKey () |
void | encryptGCM (uint32_t n, size_t size) |
BENCHMARK_PARAM (encryptGCM, 10) | |
BENCHMARK_PARAM (encryptGCM, 100) | |
BENCHMARK_PARAM (encryptGCM, 1000) | |
BENCHMARK_PARAM (encryptGCM, 4000) | |
BENCHMARK_PARAM (encryptGCM, 8000) | |
int | main (int argc, char **argv) |
BENCHMARK_PARAM | ( | encryptGCM | , |
10 | |||
) |
Referenced by encryptGCM().
BENCHMARK_PARAM | ( | encryptGCM | , |
100 | |||
) |
BENCHMARK_PARAM | ( | encryptGCM | , |
1000 | |||
) |
BENCHMARK_PARAM | ( | encryptGCM | , |
4000 | |||
) |
BENCHMARK_PARAM | ( | encryptGCM | , |
8000 | |||
) |
void encryptGCM | ( | uint32_t | n, |
size_t | size | ||
) |
Definition at line 43 of file EncryptedRecordBench.cpp.
References fizz::application_data, fizz::AppTraffic, BENCHMARK_PARAM(), BENCHMARK_SUSPEND, folly::doNotOptimizeAway(), getKey(), i, makeRandom(), folly::gen::move, fizz::Aead::setKey(), folly::size(), uint32_t, and fizz::detail::write().
TrafficKey getKey | ( | ) |
Definition at line 36 of file EncryptedRecordBench.cpp.
References fizz::TrafficKey::iv, fizz::TrafficKey::key, and toIOBuf().
Referenced by encryptGCM(), fizz::test::getCert< RSATest >(), folly::settings::detail::SettingCore< T >::set(), fizz::testing::TEST_P(), and fizz::test::TEST_P().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 99 of file EncryptedRecordBench.cpp.
References fizz::CryptoUtils::init(), folly::init(), and folly::runBenchmarks().
std::unique_ptr<folly::IOBuf> makeRandom | ( | size_t | n | ) |
Definition at line 16 of file EncryptedRecordBench.cpp.
References folly::IOBuf::copyBuffer(), i, folly::Random::rand32(), and string.
Referenced by encryptGCM(), fizz::test::MockFactory::setDefaults(), fizz::client::test::TEST_F(), and fizz::server::test::TEST_F().
std::unique_ptr<folly::IOBuf> toIOBuf | ( | std::string | hexData | ) |
Definition at line 30 of file EncryptedRecordBench.cpp.
References folly::IOBuf::copyBuffer(), string, and folly::unhexlify().
Referenced by fizz::test::callDecrypt(), fizz::test::callEncrypt(), fizz::test::getCipher(), getKey(), and fizz::test::TEST_P().