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

SecurePlayLibrary::SPTStrobeClass Class Reference

#include <SPTStrobeClass.h>

Inheritance diagram for SecurePlayLibrary::SPTStrobeClass:

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

Detailed Description

The Strobe Class is used to provide securely synchronized game play. This is essentially a combination of the Multipart transaction and the Simultaneous transaction. Each participant sends a simultaneous message to the others. Once all sent, then a “tick” or event has occurred. Then another message can be sent and the first message read.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 SPTStrobeClass ()
 ~SPTStrobeClass ()
 SPTStrobeClass (SPGameInterface *gameobj, string master, vector< string > playerIDList, bool virtualflag, string transactionID)
void pruniqueinit ()
bool APIsendHiddenSecret (string sender, vector< string > newsecret)
bool APIverifyStrobeStep ()
vector< string > APIgetSecret (string sender)
bool onsendHiddenSecret (SPMessageClass *incoming)
bool prsendinternalSecrets ()
bool onrevealSecret (SPMessageClass *incoming)
bool pronincomingTransaction (SPMessageClass *incoming)
bool APIrequestsendHiddenSecret (string pid, string sender, vector< string > newsecret)
void onrequestsendHiddenSecret (SPMessageClass *incoming)
SPTStrobeAPIClassSPgetAPI ()
bool isAactive ()
int getPrpadlength ()
map< string, vector< string > * > getSecretA ()
map< string, vector< string > * > getSecretB ()
map< string, string * > getSecrettransformA ()
map< string, string * > getSecrettransformB ()
SPTStrobeAPIClassAPITAOcreateTransaction (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

SPTStrobeClassAPIcreateTransaction (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 Member Functions

void prcheckallsent ()
virtual bool BActive ()
virtual bool AActive ()
virtual void SwitchActive ()
virtual void FlushActive ()

Private Attributes

int prpadlength
map< string, vector< string > * > secretA
map< string, string * > secrettransformA
map< string, vector< string > * > secretB
map< string, string * > secrettransformB
bool Aactive


Constructor & Destructor Documentation

SPTStrobeClass::SPTStrobeClass  ) 
 

Default Constructor

SPTStrobeClass::~SPTStrobeClass  ) 
 

Default Destructor

SPTStrobeClass::SPTStrobeClass SPGameInterface gameobj,
string  master,
vector< string >  playerIDList,
bool  virtualflag,
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
virtualflag bool - virtual flag
transactionID string - the transaction id


Member Function Documentation

bool SPTStrobeClass::AActive  )  [private, virtual]
 

This method returns whether the “A” bank is active – bool TRUE - or the “B” bank is active – bool FALSE.

Returns:
result - bool: TRUE, if successful, FALSE, if not

bool SPTStrobeClass::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.

SPTStrobeClass * SPTStrobeClass::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

vector< string > SPTStrobeClass::APIgetSecret string  sender  ) 
 

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

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

bool SPTStrobeClass::APIrequestsendHiddenSecret string  pid,
string  sender,
vector< 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 SPTStrobeClass::APIsendHiddenSecret string  sender,
vector< 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

SPTStrobeAPIClass * SPTStrobeClass::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 SPTStrobeClass::APIverifyStrobeStep  ) 
 

This method verifies whether the just completed STROBE step is valid.

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

bool SPTStrobeClass::BActive  )  [private, virtual]
 

This method returns whether the “B” bank is active – bool TRUE - or the “A” bank is active – bool FALSE.

Returns:
result - bool: TRUE, if successful, FALSE, if not

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

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

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

SPAbstractTransactionInterface * SPTStrobeClass::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.

void SPTStrobeClass::FlushActive  )  [private, virtual]
 

This method resets the transaction that is being read so it can be written by emptying it of info and resetting it.

int SPTStrobeClass::getPrpadlength  ) 
 

Getter function that returns the property: prpadlength

Returns:
prpadlength - int

map< string, vector< string > * > SPTStrobeClass::getSecretA  ) 
 

Getter function that returns the property: secretA

Returns:
secretA - Hashtable

map< string, vector< string > * > SPTStrobeClass::getSecretB  ) 
 

Getter function that returns the property: secretB

Returns:
secretB - Hashtable

map< string, string * > SPTStrobeClass::getSecrettransformA  ) 
 

Getter function that returns the property: secrettransformA

Returns:
secrettransformA - Hashtable

map< string, string * > SPTStrobeClass::getSecrettransformB  ) 
 

Getter function that returns the property: secrettransformB

Returns:
secrettransformB - Hashtable

string SPTStrobeClass::gettranstype  )  [static]
 

This method gets the transaction type.

Returns:
String

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTStrobeClass::isAactive  ) 
 

Getter function that returns the property: Aactive

Returns:
Aactive

void SPTStrobeClass::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 SPTStrobeClass::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 SPTStrobeClass::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

void SPTStrobeClass::prcheckallsent  )  [private]
 

This method checks to see if all hidden secrets have been sent. Once it does, it triggers the revealing of local secrets

bool SPTStrobeClass::pronincomingTransaction SPMessageClass incoming  )  [virtual]
 

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

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

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTStrobeClass::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:
result - bool: TRUE, if all internal secrets successfully sent, FALSE, if not.

void SPTStrobeClass::pruniqueinit  ) 
 

Uniques initialization

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTStrobeClass::registerTransaction  )  [static]
 

Registers this transaction.

Returns:

bool SPTStrobeClass::spawnConfigure SPAbstractTransactionInterface a  )  [protected]
 

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

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

SPTStrobeAPIClass * SPTStrobeClass::SPgetAPI  ) 
 

Gets this class's API

Returns:
classAPI - SPStrobeAPIClass

void SPTStrobeClass::SwitchActive  )  [private, virtual]
 

This method switches whether the A bank is active or the B bank is active


Member Data Documentation

bool SecurePlayLibrary::SPTStrobeClass::Aactive [private]
 

This property indicates which set of simultaneous events can be written (Aactive – bool TRUE for the A bank) or read (Aactive – bool TRUE for the B bank)

int SecurePlayLibrary::SPTStrobeClass::prpadlength [private]
 

This is a virtual,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, vector<string>*> SecurePlayLibrary::SPTStrobeClass::secretA [private]
 

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

map<string, vector<string>*> SecurePlayLibrary::SPTStrobeClass::secretB [private]
 

This property holds the alternate set of Simultaneous secrets

map<string, string*> SecurePlayLibrary::SPTStrobeClass::secrettransformA [private]
 

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

map<string, string*> SecurePlayLibrary::SPTStrobeClass::secrettransformB [private]
 

This property holds the alternate set of Simultaneous secret transformss


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.