proxygen
SSLSessionCacheManagerTest.cpp File Reference
#include <glog/logging.h>
#include <folly/portability/GTest.h>
#include <wangle/ssl/SSLSessionCacheManager.h>
#include <folly/Random.h>

Go to the source code of this file.

Functions

 TEST (ShardedLocalSSLSessionCacheTest, TestHash)
 

Function Documentation

TEST ( ShardedLocalSSLSessionCacheTest  ,
TestHash   
)

Definition at line 25 of file SSLSessionCacheManagerTest.cpp.

References folly::data(), wangle::ShardedLocalSSLSessionCache::hash(), folly::Random::secureRandom(), folly::size(), string, and uint32_t.

25  {
26  uint32_t buckets = 10;
27  uint32_t cacheSize = 20;
28  uint32_t cacheCullSize = 100;
29 
30  std::array<uint8_t, 32> id;
31  Random::secureRandom(id.data(), id.size());
32 
33  ShardedLocalSSLSessionCache cache(buckets, cacheSize, cacheCullSize);
34  cache.hash(std::string((char*)id.data(), id.size()));
35 }
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
const char * string
Definition: Conv.cpp:212
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43