Dash Core  0.12.2.1
P2P Digital Currency
InsecureRand Class Reference

#include <random.h>

Public Member Functions

 InsecureRand (bool _fDeterministic=false)
 
int64_t operator() (int64_t nMax)
 

Private Attributes

uint32_t nRz
 
uint32_t nRw
 
bool fDeterministic
 

Detailed Description

PRNG initialized from secure entropy based RNG

Definition at line 52 of file random.h.

Constructor & Destructor Documentation

◆ InsecureRand()

InsecureRand::InsecureRand ( bool  _fDeterministic = false)

Definition at line 141 of file random.cpp.

Member Function Documentation

◆ operator()()

int64_t InsecureRand::operator() ( int64_t  nMax)
inline

MWC RNG of George Marsaglia This is intended to be fast. It has a period of 2^59.3, though the least significant 16 bits only have a period of about 2^30.1.

Returns
random value < nMax

Definition at line 69 of file random.h.

Member Data Documentation

◆ fDeterministic

bool InsecureRand::fDeterministic
private

Definition at line 57 of file random.h.

Referenced by InsecureRand().

◆ nRw

uint32_t InsecureRand::nRw
private

Definition at line 56 of file random.h.

Referenced by InsecureRand(), and operator()().

◆ nRz

uint32_t InsecureRand::nRz
private

Definition at line 55 of file random.h.

Referenced by InsecureRand(), and operator()().


The documentation for this class was generated from the following files: