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.
Main Page | Class Hierarchy | Class List | Class Members

SecurePlayLibrary::SPMessageClass Class Reference

#include <SPMessageClass.h>

List of all members.

Public Member Functions

 SPMessageClass ()
 SPMessageClass (string INgameID, string INtransactionID, string INsenderID, vector< string > INreceiverIDlist, string INmessType, bool INsignedflag, SPUEPrivatePolicy INprivateflag, bool INencryptedflag, vector< string > INmessagebody, vector< SPbyte > INsignature, string INmessID, SPSecurityManagerInterface *game)
long getMessageIDcount ()
string validateMessageLoad ()
bool verifyMessageSignature (SPSecurityManagerInterface *secman)
string getGameID ()
string getTransactionID ()
string getSenderID ()
string getMessageType ()
bool getSignedFlag ()
bool getEncryptedFlag ()
SPUEPrivatePolicy getPrivateflag ()
string getMessageID ()
string getSignature ()
vector< SPbyte > getBSignature ()
vector< string > getReceiverIDlist ()
vector< string > getMessageBody ()
bool encrypt (SPSecurityManagerInterface *secman)
bool decrypt (SPSecurityManagerInterface *secman)

Static Public Member Functions

string newMessageID (string gameID, string transactionID, string senderID)


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


Constructor & Destructor Documentation

SPMessageClass::SPMessageClass  ) 
 

Default Constructor. Used in some cases where message class needs to be initialized as a type specifier.

SPMessageClass::SPMessageClass string  INgameID,
string  INtransactionID,
string  INsenderID,
vector< string >  INreceiverIDlist,
string  INmessType,
bool  INsignedflag,
SPUEPrivatePolicy  INprivateflag,
bool  INencryptedflag,
vector< string >  INmessagebody,
vector< SPbyte >  INsignature,
string  INmessID,
SPSecurityManagerInterface game
 

Constructs an overloaded SPMessageClass

Parameters:
INgameID String - this is the ID for the game that this message is associated with
INtransactionID - 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 String[] - ids of the recievers
INmessType String - this is the Message Type of the message (typically one of the basic game transaction methods)
INsignedflag boolean - a flag to determine if the message has been digitally signed
INprivateflag SPUtilPrivatePolicy -
INencryptedflag boolean - This flag describes whether the message is a private message denoted by "P", or public denoted by "A" or an alternate message sent to the other game recipients not part of the private transaction denoted by "Q".
INmessagebody String[] - the message
INsignature String - 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 SPSecurityManagerInterface - the security manager associated with this message.


Member Function Documentation

bool SPMessageClass::decrypt SPSecurityManagerInterface secman  ) 
 

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

Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

bool SPMessageClass::encrypt SPSecurityManagerInterface secman  ) 
 

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

Returns:
Boolean - TRUE, if successful, FALSE, if not

vector< SPbyte > SPMessageClass::getBSignature  ) 
 

Gets the signature of the message.

Returns:
signature - byte[] - the signature of the message.

bool SPMessageClass::getEncryptedFlag  ) 
 

Gets the enrypted flag of the message.

Returns:
encryptedflag - Boolean - 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:
gameID - String - game id

vector< string > SPMessageClass::getMessageBody  ) 
 

Gets the message body.

Returns:
v - String[] - gets the message body of the message.

string SPMessageClass::getMessageID  ) 
 

Gets the message id.

Returns:
messageID - String - message id

long SPMessageClass::getMessageIDcount  ) 
 

This method returns the count value from the message ID

Returns:
long

string SPMessageClass::getMessageType  ) 
 

Gets the message type.

Returns:
messType - String - message type.

SPUEPrivatePolicy SPMessageClass::getPrivateflag  ) 
 

Gets the private policy of the message.

Returns:
pf - SPUtilPrivatePolicy - the private policy.
See also:
SPUEPrivatePolicy

vector< string > SPMessageClass::getReceiverIDlist  ) 
 

Gets the reciever id list of the message.

Returns:
sv - String[] - array of reciever ids.

string SPMessageClass::getSenderID  ) 
 

Gets the senderID property of the class.

Returns:
senderID - String - sender id

string SPMessageClass::getSignature  ) 
 

Gets the signature of the message.

Returns:
signature - String - the signature of the message.

bool SPMessageClass::getSignedFlag  ) 
 

Gets the signed flag of the message.

Returns:
signedflag - Boolean - 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:
transactionID - String - transaction id

string SPMessageClass::newMessageID string  gameID,
string  transactionID,
string  senderID
[static]
 

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

Parameters:
gameID 
transactionID 
senderID 
Returns:
String

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:
errorinfo - String - errorinfo string. If the incoming message is valid, the empty string "" is returned

bool SPMessageClass::verifyMessageSignature SPSecurityManagerInterface secman  ) 
 

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:
result - Boolean: True if signature verifies, otherwise, False.


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.