DHGenerator Class Reference

List of all members.

Public Member Functions

 DHGenerator ()
 Default Constructor for the class DHGenerator.
 DHGenerator (unsigned char *keyPart, int length)
 Constructor for the class DHGenerator. Need to call this contructor when the other party has initiated the DH Generation.
 ~DHGenerator ()
 The default destructor of the class DHGenerator.
void generateRandomNumber ()
 Generates random number of 64 bits.
void generatePartialKey ()
 Generates Partial Key which is required by the other user.
void getPartialKey (unsigned char *, size_t)
 Returns the partial key generated.
void generateSessionKey (unsigned char *, unsigned int)
 Generates Session Key based on partial key received from other client.
void setPartialKey (unsigned char *, int)
 Sets the Partial Key as recieved from the other client.
void generateSessionKey ()
 Generates the Session Key.
void getSessionKey (unsigned char *sessionKey, size_t length)
 Returns the generated session key.
unsigned long int randomSeed ()
 Returns 4 bytes of randomSeed.

Constructor & Destructor Documentation

DHGenerator::DHGenerator ( unsigned char *  keyPart,
int  length 
)

Constructor for the class DHGenerator. Need to call this contructor when the other party has initiated the DH Generation.

Parameters:
keyPart The partial key required to generate DH Session Key
length The length of the partial key

Member Function Documentation

void DHGenerator::generateSessionKey (  ) 

Generates the Session Key.

void generateSessionKey()

void DHGenerator::generateSessionKey ( unsigned char *  y,
unsigned int  length 
)

Generates Session Key based on partial key received from other client.

void generateSessionKey(unsigned char *partKey,unsigned int length)

Parameters:
partKey The partial key from the other client
length The length of the partial key
void DHGenerator::getPartialKey ( unsigned char *  key,
size_t  length 
)

Returns the partial key generated.

void getPartialKey(unsigned char *partKey,size_t length)

Parameters:
partKey The partial key required send to the other client
length The length of the partial key
void DHGenerator::getSessionKey ( unsigned char *  sessionKey,
size_t  length 
)

Returns the generated session key.

void getSessionKey(unsigned char *sessionKey,size_t length)

Parameters:
sessionKey Session Key generated
Length of the session key
unsigned long int DHGenerator::randomSeed (  ) 

Returns 4 bytes of randomSeed.

unsigned long int randomSeed()

void DHGenerator::setPartialKey ( unsigned char *  y,
int  length 
)

Sets the Partial Key as recieved from the other client.

void setPartialKey(unsigned char *partKey,int length)

Parameters:
partKey The partial key from the other client
length The length of the partial key

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines

Generated on 2 Dec 2014 by  doxygen 1.6.1