#include <folly/Random.h>
#include <array>
#include <mutex>
#include <random>
#include <folly/CppAttributes.h>
#include <folly/SingletonThreadLocal.h>
#include <folly/ThreadLocal.h>
#include <folly/detail/FileUtilDetail.h>
#include <folly/portability/Config.h>
#include <folly/portability/SysTime.h>
#include <folly/portability/Unistd.h>
#include <folly/synchronization/RelaxedAtomic.h>
#include <glog/logging.h>
#ifdef _MSC_VER
#include <wincrypt.h>
#else
#include <fcntl.h>
#endif
#if FOLLY_HAVE_GETRANDOM
#include <sys/random.h>
#endif
namespace folly {
namespace {
void readRandomDevice(void* data, size_t size) { … }
class BufferedRandomDevice { … };
relaxed_atomic<size_t> BufferedRandomDevice::globalEpoch_{ … };
struct RandomTag { … };
BufferedRandomDevice::BufferedRandomDevice(size_t bufferSize)
: … { … }
void BufferedRandomDevice::getSlow(unsigned char* data, size_t size) { … }
}
void Random::secureRandom(void* data, size_t size) { … }
ThreadLocalPRNG::result_type ThreadLocalPRNG::operator()() { … }
}