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

SecurePlayLibrary::SPTSimultaneousClass Class Reference

#include <SPTSimultaneousClass.h>

Inheritance diagram for SecurePlayLibrary::SPTSimultaneousClass:

SecurePlayLibrary::SPAbstractTransactionClass SecurePlayLibrary::SPRootTransactionClass SecurePlayLibrary::SPAbstractTransactionInterface List of all members.

Detailed Description

The simultaneous transaction allows its participants to send "Simultaneous Secrets" to each other and reveal them at the same time.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 ~SPTSimultaneousClass ()
 SPTSimultaneousClass ()
 SPTSimultaneousClass (SPGameInterface *gameobj, string master, vector< string > playerIDList, bool privateflag, string transactionID)
void pruniqueinit ()
bool APIsendHiddenSecret (string sender, string newsecret)
bool APIverifySimultaneous ()
string APIgetSecret (string sender)
bool onsendHiddenSecret (SPMessageClass *incoming)
bool prsendinternalSecrets ()
bool onrevealSecret (SPMessageClass *incoming)
bool pronincomingTransaction (SPMessageClass *incoming)
bool APIrequestsendHiddenSecret (string pid, string sender, string newsecret)
void onrequestsendHiddenSecret (SPMessageClass *incoming)
SPTSimultaneousAPIClassSPgetAPI ()
int getPrpadlength ()
map< string, string > getSecret ()
map< string, string > getSecretpadded ()
map< string, string > getSecrettransform ()
SPTSimultaneousAPIClassAPITAOcreateTransaction (SPGameAPIClass *gapi, string transmaster, vector< string > playerIDList, bool privateflag)
SPAbstractTransactionInterfacecreateTransaction (SPGameAPIInterface *gameapiobj, string master, vector< string > playerIDList, bool privateflag, string transactionID)

Static Public Member Functions

SPTSimultaneousClassAPIcreateTransaction (SPGameAPIClass *gapi, string transmaster, vector< string > playerIDList, bool privateflag)
bool APIBcreateTransaction (SPGameAPIClass *gapi, string transmaster, vector< string > playerIDList, bool privateflag)
string gettranstype ()
bool registerTransaction ()

Protected Member Functions

SPAbstractTransactionInterfacebuildSPawn ()
bool spawnConfigure (SPAbstractTransactionInterface *a)

Private Attributes

int prpadlength
map< string, string > secret
map< string, string > secretpadded
map< string, string > secrettransform


Constructor & Destructor Documentation

SPTSimultaneousClass::~SPTSimultaneousClass  ) 
 

Default Destructor

SPTSimultaneousClass::SPTSimultaneousClass  ) 
 

Default Constructor

SPTSimultaneousClass::SPTSimultaneousClass SPGameInterface gameobj,
string  master,
vector< string >  playerIDList,
bool  privateflag,
string  transactionID
 

Overloaded Constructor

Parameters:
gameobj SPAbstractGameInterface - the game object with which the transaction is associated
master string - the master of the transaction
playerIDList vector<string> - player id list of players who are associated with the transaction
privateflag bool - private flag
transactionID string - the transaction id


Member Function Documentation

bool SPTSimultaneousClass::APIBcreateTransaction SPGameAPIClass gapi,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[static]
 

This method allows the creation of a new MultiPartSimultaneous type, internally controlled transaction. It also sends a message to the other transaction and game participants about this new transaction.

Parameters:
gapi SPGameAPIInterface - the game that will be associated with this transaction.
transmaster String - player id of the master of the transaction
playerIDList String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

SPTSimultaneousClass * SPTSimultaneousClass::APIcreateTransaction SPGameAPIClass gapi,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[static]
 

This method allows the creation of a new MultiPartSimultaneous type, internally controlled transaction. It also sends a message to the other transaction and game participants about this new transaction.

Parameters:
gapi SPGameAPIInterface - the game that will be associated with this transaction.
transmaster String - player id of the master of the transaction
playerIDList String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
tran - SPMultiPartSimultaneousClass(but returns the actual object) - if successful, null if not

string SPTSimultaneousClass::APIgetSecret string  sender  ) 
 

This method returns the actual secret for the specified player that this transaction is protecting, if available.

Parameters:
sender string - sender of the secret
Returns:
secret - string - the secret

bool SPTSimultaneousClass::APIrequestsendHiddenSecret string  pid,
string  sender,
string  newsecret
 

This method allows any party to request the specified transaction participant send a Secret to support the simultaneous transaction. It is mainly used for remote debugging purposes.

Parameters:
pid string - player id, or the master of the transaction
sender string - sender, or the requestor, can not be master
newsecret string - the secret
Returns:
result - bool: TRUE, if request successfully sent, FALSE, if not

bool SPTSimultaneousClass::APIsendHiddenSecret string  sender,
string  newsecret
 

This method allows the specified transaction participant to send the transform of a secret to the other participants in the Simultaneous transaction.

Parameters:
sender string - sender of the secret
newsecret string - the secret
Returns:
result - bool: TRUE, if successful, FALSE, if not

SPTSimultaneousAPIClass * SPTSimultaneousClass::APITAOcreateTransaction SPGameAPIClass gapi,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
 

This method allows the creation of a new MultiPartSimultaneous type, internally controlled transaction. It also sends a message to the other transaction and game participants about this new transaction.

Parameters:
gapi SPGameAPIInterface - the game that will be associated with this transaction.
transmaster String - player id of the master of the transaction
playerIDList String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
Returns:
tran - SPMultiPartSimultaneousAPIClass - if successful, null if not

bool SPTSimultaneousClass::APIverifySimultaneous  ) 
 

This method verifies whether a Simultaneous transaction was carried out successfully and responds with a simple bool.

Returns:
result - bool: TRUE, if transaction verified, FALSE, if not.

SPAbstractTransactionInterface * SPTSimultaneousClass::buildSPawn  )  [protected, virtual]
 

This method provides the unique transaction creation services for spawned Simultaneous transactions

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

SPAbstractTransactionInterface * SPTSimultaneousClass::createTransaction SPGameAPIInterface gameapiobj,
string  master,
vector< string >  playerIDList,
bool  privateflag,
string  transactionID
[virtual]
 

This method creates a SPMultiPartSimultaneousClass transaction.

Parameters:
gameapiobj SPGameAPIInterface - the game that will be associated with this transaction.
master String - player id of the master of the transaction
playerIDList String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
privateflag boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
transactionID String - transaction id.

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

int SPTSimultaneousClass::getPrpadlength  ) 
 

Getter function that returns the property: prpadlength

Returns:
prpadlength - int

map< string, string > SPTSimultaneousClass::getSecret  ) 
 

Getter function that returns the property: secret

Returns:
secret - Hashtable

map< string, string > SPTSimultaneousClass::getSecretpadded  ) 
 

Getter function that returns the property: secretpadded

Returns:
secretpadded - Hashtable

map< string, string > SPTSimultaneousClass::getSecrettransform  ) 
 

Getter function that returns the property: secrettransform

Returns:
secrettransform - Hashtable

string SPTSimultaneousClass::gettranstype  )  [static]
 

This method gets the transaction type.

Returns:
String

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

void SPTSimultaneousClass::onrequestsendHiddenSecret SPMessageClass incoming  ) 
 

Handles incoming requests to create a sendHiddenSecret message by specified recipient

Parameters:
incoming SPMessageClass - incoming message
Returns:
bool - TRUE, if successful, FALSE, if not

bool SPTSimultaneousClass::onrevealSecret SPMessageClass incoming  ) 
 

This method handles the incoming message to reveal a secret. The message can come from any participant in the transaction and should include the secretpadded as its sole content. Once all of the secrettransforms have been received, this method will trigger the sending of all local secrets via the prsendInternalSecrets method.

Parameters:
incoming SPMessageClass - incoming message
Returns:
result - bool: TRUE, if handled, FALSE, if not

bool SPTSimultaneousClass::onsendHiddenSecret SPMessageClass incoming  ) 
 

This method handles incoming sendHiddenSecret messages. These messages include the secrettransform and can sent by any transaction participant.

Parameters:
incoming SPMessageClass - incoming message
Returns:
result - bool: TRUE, if successfully handled, FALSE, if not

bool SPTSimultaneousClass::pronincomingTransaction SPMessageClass incoming  )  [virtual]
 

This method provides the unique handlers for incoming Simultaneous turn message types

Parameters:
incoming SPMessageClass - incoming message
Returns:
bool - TRUE if successful, FALSE, if unsuccessful

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTSimultaneousClass::prsendinternalSecrets  ) 
 

This method safely sends all of the internal Secrets from participants in the Simultaneous transaction to remote players. It is automatically triggered by the onsendHiddenSecret method/event once all incoming secret transforms have been received.

Returns:
ressult - bool: TRUE, if all internal secrets successfully sent, FALSE, if not.

void SPTSimultaneousClass::pruniqueinit  ) 
 

Unique initialization ( an addition to the constructor )

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTSimultaneousClass::registerTransaction  )  [static]
 

Registers this transaction.

Returns:

bool SPTSimultaneousClass::spawnConfigure SPAbstractTransactionInterface a  )  [protected]
 

This method provides the unique transaction configuration services for spawned Simultaneous transactions

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

SPTSimultaneousAPIClass * SPTSimultaneousClass::SPgetAPI  ) 
 

Gets this class's API

Returns:
classAPI - SPSimultaneousAPIClass


Member Data Documentation

int SecurePlayLibrary::SPTSimultaneousClass::prpadlength [private]
 

This is a private,constant property. It is used to specify the length of the random padding to a transmitted secret. The random padding is necessary to prevent dictionary attacks against secrets. The default setting is 20. Please set appropriately to meet the specific client needs.

map<string, string> SecurePlayLibrary::SPTSimultaneousClass::secret [private]
 

This an associative array of simultaneous secrets that are being protected through the Simultaneous transaction.

map<string, string> SecurePlayLibrary::SPTSimultaneousClass::secretpadded [private]
 

This property holds the associative array of the Secret strings padded with its random string to protect against dictionary attacks. This is the string that is actually operated on by the transform and sent to remote players.

map<string, string> SecurePlayLibrary::SPTSimultaneousClass::secrettransform [private]
 

This property is the associative array of irreversible transforms of the secretpadded strings. The secrettransform is sent first to make the secret unmodifiable.


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.