Random class. More...

#include <random.h>

Public Member Functions

virtual bool random_bool ()=0
 Get the random boolean. More...
 
virtual void random_bytes (unsigned char *out_dest_ptr, int num_bytes)=0
 Get the random bytes. More...
 
virtual void random_bytes_nzero (unsigned char *out_dest_ptr, int num_bytes)=0
 Get the random bytes excluding bytes containing 0. More...
 

Static Public Member Functions

static std::shared_ptr< Randomcreate (int cache_size=1024)
 Constructs the object. More...
 

Detailed Description

Random class.

Uses the operating system cryptographically secure pseudorandom number generator

Member Function Documentation

static std::shared_ptr<Random> uicore::Random::create ( int  cache_size = 1024)
static

Constructs the object.

cache_size = Random number cache size

virtual bool uicore::Random::random_bool ( )
pure virtual

Get the random boolean.

out_dest_ptr = Where to write to num_bytes = Number of bytes to copy

virtual void uicore::Random::random_bytes ( unsigned char *  out_dest_ptr,
int  num_bytes 
)
pure virtual

Get the random bytes.

out_dest_ptr = Where to write to num_bytes = Number of bytes to copy

virtual void uicore::Random::random_bytes_nzero ( unsigned char *  out_dest_ptr,
int  num_bytes 
)
pure virtual

Get the random bytes excluding bytes containing 0.

out_dest_ptr = Where to write to num_bytes = Number of bytes to copy


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