Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SecurePlayLibrary::SPMessageClass Class Reference

#include <SPMessageClass.h>

List of all members.


Detailed Description

This is a "game-level" message that is sent between SecurePlay library instances for each Player.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 SPMessageClass ()
 ~SPMessageClass ()
 SPMessageClass (const SPMessageClass &mess)
 operator= (const SPMessageClass &mess)
 SPMessageClass (string INgameID, string INtransactionID, string INsenderID, vector< string > INreceiverIDlist, string INmessType, bool INsignedflag, SPUEPrivatePolicy INvirtualflag, bool INencryptedflag, vector< string > INmessagebody, vector< byte > INsignature, string INmessID, SPGameInterface *game)
string validateMessageLoad ()
bool verifyMessageSignature (SPGameInterface *game)
string getGameID ()
string getTransactionID ()
string getSenderID ()
string getMessageType ()
bool getSignedFlag ()
bool getEncryptedFlag ()
SPUEPrivatePolicy getPrivateflag ()
string getMessageID ()
string getSignature ()
vector< bytegetBSignature ()
vector< string > getReceiverIDlist ()
vector< string > getMessageBody ()
bool encrypt (SPGameInterface *spc)
bool decrypt (SPGameInterface *spc)

Public Attributes

const string extendedversion
const string releaseversion

Private Member Functions

void buildmessage (string INgameID, string INtransactionID, string INsenderID, vector< string > INreceiverIDlist, string INmessType, bool INsignedflag, SPUEPrivatePolicy INprivateflag, bool INencryptedflag, vector< string > INmessagebody, vector< byte > INsignature, string INmessID, SPGameInterface *game)
string prnewMessageID ()
string prhashableMessage ()

Private Attributes

string gameID
string transactionID
string senderID
vector< string > receivers
string messType
bool signedflag
bool encryptedflag
SPUEPrivatePolicy privateflag
vector< string > message
vector< bytesignature
string messageID


Constructor & Destructor Documentation

SPMessageClass::SPMessageClass  ) 
 

Default Constructor.

SPMessageClass::~SPMessageClass  ) 
 

Default Destructor

SPMessageClass::SPMessageClass const SPMessageClass mess  ) 
 

Copy constructor.

SPMessageClass::SPMessageClass string  INgameID,
string  INtransactionID,
string  INsenderID,
vector< string >  INreceiverIDlist,
string  INmessType,
bool  INsignedflag,
SPUEPrivatePolicy  INvirtualflag,
bool  INencryptedflag,
vector< string >  INmessagebody,
vector< byte INsignature,
string  INmessID,
SPGameInterface game
 

Constructs an overloaded SPAbstractMessageClass()

Parameters:
INgameID string - this is the ID for the game that this message is associated with
INtransactionID string - this is the ID of the transaction that this message is associated with
INsenderID string - this is the identity of the sender of the message
INreceiverIDlist vector<string> - ids of the recievers
INmessType string - this is the Message Type of the message (typically one of the basic game transaction methods)
INsignedflag bool - a flag to determine if the message has been digitally signed
INvirtualflag SPUEPrivatePolicy - privacy flag.
INencryptedflag bool - This flag describes whether the message is a virtual message denoted by "P", or virtual denoted by "A" or an alternate message sent to the other game recipients not part of the virtual transaction denoted by "Q".
INmessagebody vector<string> - the message
INsignature vector<byte> - The signature is the either the hash of the "prhashableMessage()" portions of the message or a digital signature function applied to the message hash.
INmessID string - The message ID is a unique message identifer at the game instance level.
spc SecurePlayClass - The SecurePlayLibrary associated with this message


Member Function Documentation

void SPMessageClass::buildmessage string  INgameID,
string  INtransactionID,
string  INsenderID,
vector< string >  INreceiverIDlist,
string  INmessType,
bool  INsignedflag,
SPUEPrivatePolicy  INprivateflag,
bool  INencryptedflag,
vector< string >  INmessagebody,
vector< byte INsignature,
string  INmessID,
SPGameInterface game
[private]
 

This method builds this class.

Parameters:
INgameID string - this is the ID for the game that this message is associated with
INtransactionID string - this is the ID of the transaction that this message is associated with
INsenderID string - this is the identity of the sender of the message
INreceiverIDlist vector<string> - ids of the recievers
INmessType string - this is the Message Type of the message (typically one of the basic game transaction methods)
INsignedflag bool - a flag to determine if the message has been digitally signed
INvirtualflag SPUEPrivatePolicy - privacy flag.
INencryptedflag bool - This flag describes whether the message is a virtual message denoted by "P", or virtual denoted by "A" or an alternate message sent to the other game recipients not part of the virtual transaction denoted by "Q".
INmessagebody vector<string> - the message
INsignature vector<byte> - The signature is the either the hash of the "prhashableMessage()" portions of the message or a digital signature function applied to the message hash.
INmessID string - The message ID is a unique message identifer at the game instance level.
game SPGameInterface* - this is the game interface associated with this message.

bool SPMessageClass::decrypt SPGameInterface spc  ) 
 

This method safely decrypts the message string* and loads the results into the message body array using the global SPdecrypt function.

Parameters:
spc SPGameInterface* - Game interface associated with this message.
Returns:
bool: TRUE, if successful, FALSE, if not.

bool SPMessageClass::encrypt SPGameInterface spc  ) 
 

This method safely encrypts the message body string* using the global SPencrypt function.

Parameters:
spc SPGameInterface* - Game interface associated with this message.
Returns:
bool - TRUE, if successful, FALSE, if not

vector< byte > SPMessageClass::getBSignature  ) 
 

Gets the signature of the message.

Returns:
vector<byte> - the signature of the message.

bool SPMessageClass::getEncryptedFlag  ) 
 

Gets the enrypted flag of the message.

Returns:
bool - TRUE, if enrypted flag is true, FALSE, if enrypted flag is false

string SPMessageClass::getGameID  ) 
 

Gets the id of the game associated with the message.

Returns:
string - game id

vector< string > SPMessageClass::getMessageBody  ) 
 

Gets the message body.

Returns:
vector<string> - gets the message body of the message.

string SPMessageClass::getMessageID  ) 
 

Gets the message id.

Returns:
string - message id

string SPMessageClass::getMessageType  ) 
 

Gets the message type.

Returns:
string - message type.

SPUEPrivatePolicy SPMessageClass::getPrivateflag  ) 
 

Gets the virtual policy of the message.

Returns:
SPUtilPrivatePolicy - the virtual policy.
See also:
SPUtilPrivatePolicy

vector< string > SPMessageClass::getReceiverIDlist  ) 
 

Gets the reciever id list of the message.

Returns:
vector<string> - array of reciever ids.

string SPMessageClass::getSenderID  ) 
 

Gets the senderID property of the class.

Returns:
string - sender id

string SPMessageClass::getSignature  ) 
 

Gets the signature of the message.

Returns:
string - the signature of the message.

bool SPMessageClass::getSignedFlag  ) 
 

Gets the signed flag of the message.

Returns:
bool - TRUE, if signed flag is true, FALSE, if signed flag is false

string SPMessageClass::getTransactionID  ) 
 

Gets the id of the transaction associated with the message.

Returns:
string - transaction id

SPMessageClass::operator= const SPMessageClass mess  ) 
 

= operator for copying this class.

string SPMessageClass::prhashableMessage  )  [private]
 

Creates a string to be used by the hash function. This string includes the portions of the message instance that are to be included in the hash function.

Returns:
hashable - string* - hashable message tured into a string*

string SPMessageClass::prnewMessageID  )  [private]
 

This method generates a messageID for messages that need an ID generated.

Returns:
messID string - new Message ID

string SPMessageClass::validateMessageLoad  ) 
 

This method validates a SPMessageClass instance to check that it is well-formed - that all of the parameters are set from a SPMessageClass perspective. NOTE: it does not validate that the content of a message is valid.

Returns:
string - If the incoming message is valid, the empty string "" is returned, else the error explanation is returned.

bool SPMessageClass::verifyMessageSignature SPGameInterface game  ) 
 

This method verifies the signature associated with a message. Note, if the signedflag is set to TRUE, a real digital signature is used as specified by the game configuration (see SPGame). If the signedflag is set to FALSE, then the message is checked against the hash function.

Returns:
bool: True if signature verifies, otherwise, False.


Member Data Documentation

bool SecurePlayLibrary::SPMessageClass::encryptedflag [private]
 

The "encryptedflag" determines whether the message has been encrypted so that it can be handled appropriately. Typically, locally generated messages are not stored in the message log in encrypted form nor are remotely generated. Encryption occurs after signing so that signatures will not be affected if the encryption has been removed. The encrypted flag can have two values: true (for encrypted) and false (for not).

const string SecurePlayLibrary::SPMessageClass::extendedversion
 

Developer extended version.

string SecurePlayLibrary::SPMessageClass::gameID [private]
 

The gameID is a unique ID associated with the game. It is generated externally to the SecurePlay library.

vector<string> SecurePlayLibrary::SPMessageClass::message [private]
 

This string* array holds the message body. Message body elements should consists solely of string*s of alphanumeric characters 0..9A..Za..z.

string SecurePlayLibrary::SPMessageClass::messageID [private]
 

The message ID is a unique message identifer at the game instance level. Thus, messageIDs should be unique within a specific game.

string SecurePlayLibrary::SPMessageClass::messType [private]
 

This is the most important element of a message - it tells the receiving SecurePlay library instance where to hand the message off to for further processing.

SPUEPrivatePolicy SecurePlayLibrary::SPMessageClass::privateflag [private]
 

This flag describes whether the message is a virtual message (i.e., that it will be routed only to a specific set of recipients) denoted by "P", or virtual (that is will be routed to all players) denoted by "A" or an alternate message sent to the other game recipients not part of the virtual transaction denoted by "Q".

vector<string> SecurePlayLibrary::SPMessageClass::receivers [private]
 

This is the list of receivers of a message.

const string SecurePlayLibrary::SPMessageClass::releaseversion
 

IT GlobalSecure release version.

string SecurePlayLibrary::SPMessageClass::senderID [private]
 

The senderID is the unique identifier of the sender Player (instance of SPPlayerClass) of a game message.

vector<byte> SecurePlayLibrary::SPMessageClass::signature [private]
 

The signature is the either the hash of the "prhashableMessage()" portions of the message or a digital signature function applied to the message hash.

bool SecurePlayLibrary::SPMessageClass::signedflag [private]
 

This provides a flag to determine if the message has been digitally signed. NOTE: as a default, the SecurePlay library does attach a hash of the message that is used in this attribute.

string SecurePlayLibrary::SPMessageClass::transactionID [private]
 

This is the unique identifier of the transaction associated with the message. It is used to key the message processor to route the incoming message to the proper transaction object.


The documentation for this class was generated from the following files: 2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.