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

SecurePlayLibrary::SPTMultiPartSecretClass Class Reference

#include <SPTMultiPartSecretClass.h>

Inheritance diagram for SecurePlayLibrary::SPTMultiPartSecretClass:

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

Detailed Description

This method is an extension of the SPSecret Class to handle multi-part (String Array) secrets
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Public Member Functions

 SPTMultiPartSecretClass ()
 ~SPTMultiPartSecretClass ()
 SPTMultiPartSecretClass (SPGameInterface *gameobj, string master, vector< string > playerIDList, bool privateflag, string transactionID)
bool APIsendHiddenSecret (string sender, vector< string > newsecret)
bool APIrevealSecret (string sender, vector< string > recievers, string liststatus)
bool APIverifySecret ()
vector< string > APIgetSecret ()
bool onsendHiddenSecret (SPMessageClass *incoming)
bool onrevealSecret (SPMessageClass *incoming)
bool APIrequestsendHiddenSecret (string pid, vector< string > newsecret)
void onrequestsendHiddenSecret (SPMessageClass *incoming)
bool APIrequestrevealSecret (string pid, vector< string > receivers, string liststatus)
void onrequestrevealSecret (SPMessageClass *incoming)
SPTMultiPartSecretAPIClassSPgetAPI ()
int getPrpadlength ()
string getSecretpadding ()
string getSecrettransform ()
SPAbstractTransactionInterfacecreateTransaction (SPGameAPIInterface *gameapiobj, string master, vector< string > playerIDList, bool privateflag, string transactionID)

Static Public Member Functions

SPTMultiPartSecretClassAPIcreateTransaction (SPGameAPIInterface *gapi, string transmaster, vector< string > playerIDList, bool privateflag)
bool APIBcreateTransaction (SPGameAPIInterface *gapi, string transmaster, vector< string > playerIDList, bool privateflag)
SPTMultiPartSecretAPIClassAPITAOcreateTransaction (SPGameAPIInterface *gapi, string transmaster, vector< string > playerIDList, bool privateflag)
string gettranstype ()
bool registerTransaction ()

Protected Member Functions

bool pronincomingTransaction (SPMessageClass *incoming)
SPAbstractTransactionInterfacebuildSPawn ()
bool spawnConfigure (SPAbstractTransactionInterface *a)

Private Attributes

const int prpadlength
vector< string > secret
string secretpadding
string secrettransform


Constructor & Destructor Documentation

SPTMultiPartSecretClass::SPTMultiPartSecretClass  ) 
 

Default Constructor.

SPTMultiPartSecretClass::~SPTMultiPartSecretClass  ) 
 

Default Destructor

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

Overloaded Constructor

Parameters:
gameobj SPAbstractGameInterface - the game object to which this transaction will be associated with
master string - the master of this transaction
playerIDList vector<string> - players who will be associated with this transaction
privateflag bool - private flag of this transaction
transactionID string - the id of this transaction


Member Function Documentation

bool SPTMultiPartSecretClass::APIBcreateTransaction SPGameAPIInterface gapi,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[static]
 

This method allows the creation of a new MultiPartSecret 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.

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

This method allows the creation of a new MultiPartSecret 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 - SPMultiPartSecretClass(but returns the actual object) - if successful, null if not

vector< string > SPTMultiPartSecretClass::APIgetSecret  ) 
 

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

Returns:
result - string - the secret

bool SPTMultiPartSecretClass::APIrequestrevealSecret string  pid,
vector< string >  receivers,
string  liststatus
 

This method allows a third party player to request that the secret be revealed by the transaction master to the specified receiver list. This method is mainly used for remote debugging.

Parameters:
pid string - the player id of the requestor
receivers vector<string> - player ids of recievers of the secret
liststatus string - status of the list
Returns:
result - bool: TRUE, if request successfully sent, FALSE, if not

bool SPTMultiPartSecretClass::APIrequestsendHiddenSecret string  pid,
vector< string >  newsecret
 

This method allows a non-transaction master to request the transaction master send a Secret. It is mainly used for remote debugging purposes.

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

bool SPTMultiPartSecretClass::APIrevealSecret string  sender,
vector< string >  recievers,
string  liststatus
 

This method sends the secretpadded value to the specified remote players.

Parameters:
sender string - the sender of the secret
recievers vector<string> - player ids of recievers
liststatus string - "P" or "L"
Returns:
result - bool: TRUE, if successful, FALSE, if not

bool SPTMultiPartSecretClass::APIsendHiddenSecret string  sender,
vector< string >  newsecret
 

This method allows the Secret Transaction master to send the transform of a secret to the other participants in the transaction.

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

SPTMultiPartSecretAPIClass * SPTMultiPartSecretClass::APITAOcreateTransaction SPGameAPIInterface gapi,
string  transmaster,
vector< string >  playerIDList,
bool  privateflag
[static]
 

This method allows the creation of a new MultiPartSecret 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 - SPMultiPartSecretAPIClass - if successful, null if not

bool SPTMultiPartSecretClass::APIverifySecret  ) 
 

This method verifies the paddedsecret that was sent. It computes the transform of the paddedsecret that has been sent and compares it with the previously sent secrettransform. It returns a bool flag to indicate success or failure.

Returns:
result - bool: TRUE, if able to verify secret, FALSE, if not

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

This method provides the unique transaction creation services for spawned Multipart Secret transactions

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

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

This method creates a SPMultiPartSecretClass 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 SPTMultiPartSecretClass::getPrpadlength  ) 
 

Getter function that returns the property: prpadlength

Returns:
prpadlength - int

string SPTMultiPartSecretClass::getSecretpadding  ) 
 

Getter function that returns the property: secretpadding

Returns:
secretpadding - string

string SPTMultiPartSecretClass::getSecrettransform  ) 
 

Getter function that returns the property: secrettransform

Returns:
secrettransform - string

string SPTMultiPartSecretClass::gettranstype  )  [static]
 

This method gets the transaction type.

Returns:
String

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

void SPTMultiPartSecretClass::onrequestrevealSecret SPMessageClass incoming  ) 
 

This method handles incoming requests for the transaction master to create a revealSecret message to the specified receivers. It is mainly used for remote debugging purposes.

Parameters:
incoming SPMessageClass - incoming message

void SPTMultiPartSecretClass::onrequestsendHiddenSecret SPMessageClass incoming  ) 
 

Handles incoming requests to create a sendHiddenSecret message

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

bool SPTMultiPartSecretClass::onrevealSecret SPMessageClass incoming  ) 
 

This method handles the incoming message to reveal a secret. The message should only come from the Transaction master and should include the secretpadded as its sole content.

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

bool SPTMultiPartSecretClass::onsendHiddenSecret SPMessageClass incoming  ) 
 

This method handles incoming sendHiddenSecret messages. These messages include the secrettransform and can only be sent by the Transaction master.

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

bool SPTMultiPartSecretClass::pronincomingTransaction SPMessageClass incoming  )  [protected, virtual]
 

This method provides the unique handlers for incoming Multipart Secret turn message types

Parameters:
incoming SPMessageClass - incoming message
Returns:
result - bool: TRUE, if message handled by unique transaction messages, FALSE, if not.

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTMultiPartSecretClass::registerTransaction  )  [static]
 

Registers this transaction.

Returns:

bool SPTMultiPartSecretClass::spawnConfigure SPAbstractTransactionInterface a  )  [protected]
 

This method provides the unique transaction configuration services for spawned Multipart Secret transactions

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

SPTMultiPartSecretAPIClass * SPTMultiPartSecretClass::SPgetAPI  ) 
 

Gets this class's API

Returns:
classAPI - SPMultiPartSecretAPIClass


Member Data Documentation

const int SecurePlayLibrary::SPTMultiPartSecretClass::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.

vector<string> SecurePlayLibrary::SPTMultiPartSecretClass::secret [private]
 

This is the secret that is being protected through the Secret transaction.

string SecurePlayLibrary::SPTMultiPartSecretClass::secretpadding [private]
 

This property holds the secret string 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.

string SecurePlayLibrary::SPTMultiPartSecretClass::secrettransform [private]
 

This property is the irreversible transform of the secretpadded string. 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.