In file /home/eternity/Source/Common/RandomGenerator/H/randomGenerator.h:

class RandomGenerator : public Debugable

Generator of random data

Inheritance:

RandomGenerator < Debugable


Public Methods

MsgField* RandomGenerator::RandomBytes (Size count)
Generate random bytes
RandomGenerator::RandomGenerator (LogFile *aLogFile)
Random generator constructor
Size RandomGenerator::RandomSize ()
Generate random Size

Public

methods

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Public

attributes

int debugOptions
What messages should be logged
LogFile* logFile
Log file for debug messages

Documentation

Generator of random data. Generates a message field that contains
methods

MsgField* RandomGenerator::RandomBytes(Size count)
Generate random bytes. Generates count bytes of random data and returns it in a MsgField. Used to generate data for padding size of messages and also for generating symetric and asymetric keys.
Returns:
MsgField filled with number random bytes
Parameters:
count - Number of bytes to generate
Author:
Pavel
See Also:
KeyManager, Cipherer

RandomGenerator::RandomGenerator(LogFile *aLogFile)
Random generator constructor. It opens device /dev/random and initializes its seed using the random data from it. /dev/random should provide us with suitable strength in randomness - if evene stronger randomness is required or bigger indenpendence on platform, we can modify this class to cooperate with some hardware random generator.
Parameters:
aLogFile - Log file for debug messages.
Author:
Pavel
See Also:
KeyManager

Size RandomGenerator::RandomSize()
Generate random Size. Generates Size of random data and returns it. Used to generate random and unique ID's.
Returns:
Size filled with random data
Author:
Pavel
See Also:
KeyManager, Cipherer, UniqueIDGenerator


This class has no child classes.
Author:
Pavel
See Also:

alphabetic index hierarchy of classes


generated by doc++