VMime
random Class Reference

Static Public Member Functions

static unsigned int getNext ()
 
static unsigned int getTime ()
 
static unsigned int getProcess ()
 
static const string getString (const size_t length, const string &randomChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
 

Detailed Description

Pseudo-random number generator.

Member Function Documentation

unsigned int getNext ( )
static

Return a new random number.

Returns
random number

Referenced by body::generateRandomBoundaryString(), and random::getString().

unsigned int getProcess ( )
static

Return the current process number (may be user to build "random" strings).

Returns
process number

References platform::getHandler().

const string getString ( const size_t  length,
const string randomChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 
)
static

Return a random character string with the specified length.

Parameters
lengthlength of the string to generate
randomCharslist of characters to use
Returns
random string

References random::getNext().

unsigned int getTime ( )
static

Return the current time as a number (may be used to build "random" strings).

Returns
time as a number

References platform::getHandler().

Referenced by body::generateRandomBoundaryString().


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