5 #ifndef V8_BASE_UTILS_RANDOM_NUMBER_GENERATOR_H_
6 #define V8_BASE_UTILS_RANDOM_NUMBER_GENERATOR_H_
28 class RandomNumberGenerator
FINAL {
72 void NextBytes(
void* buffer,
size_t buflen);
75 void SetSeed(int64_t seed);
77 int64_t initial_seed()
const {
return initial_seed_; }
81 static const int64_t kAddend = 0xb;
int Next(int bits) WARN_UNUSED_RESULT
bool NextBool() WARN_UNUSED_RESULT
RandomNumberGenerator(int64_t seed)
int NextInt(int max) WARN_UNUSED_RESULT
double NextDouble() WARN_UNUSED_RESULT
static void SetEntropySource(EntropySource entropy_source)
int NextInt() WARN_UNUSED_RESULT
#define WARN_UNUSED_RESULT
#define V8_2PART_UINT64_C(a, b)
static RandomNumberGenerator::EntropySource entropy_source
Debugger support for the V8 JavaScript engine.
bool(* EntropySource)(unsigned char *buffer, size_t length)
EntropySource is used as a callback function when v8 needs a source of entropy.