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::SPTSecretClass Class Reference

#include <SPTSecretClass.h>

Inheritance diagram for SecurePlayLibrary::SPTSecretClass:

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

Public Member Functions

 SPTSecretClass ()
 SPTSecretClass (SPGameInterface *gameobj, string master, vector< string > playerIDList, bool privateflag, string transactionID, string AGE, string transform)
bool APIrevealSecret (string sender, vector< string > recievers, bool listonly)
bool APIverifySecret ()
string APIgetSecret ()
bool onrevealSecret (SPMessageClass *incoming)
bool pronincomingTransaction (SPMessageClass *incoming)
int getPrpadlength ()
string getSecretpadded ()
string getSecrettransform ()
SPAbstractTransactionInterfaceAPIcreateTransaction (SPGameInterface *gameapiobj, SPMessageClass *message)
string APIgetTransactionType ()

Static Public Member Functions

string gettranstype ()
bool registerTransaction ()
SPAbstractTransactionInterfacecreateSecret (SPGameInterface *gameobj, string master, vector< string > playerIDList, bool privateflag, string AGE, string newsecret)

Static Protected Attributes

const string status_secretsent = "secretsent"
const string status_secretrevealed = "secretrevealed"
const string status_secretrevealedlist = "secretrevealedlist"

Detailed Description

This class implements the Secret Transaction type - the ability for a single party, the Transaction Master, to send a single secret to other participants in a non-refutable fashion. The Secret is committed to irrevokably at the time it is initially sent in hidden form and then can be subsequently revealed.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Constructor & Destructor Documentation

SPTSecretClass::SPTSecretClass  ) 
 

Default Constructor

SPTSecretClass::SPTSecretClass SPGameInterface gameobj,
string  master,
vector< string >  playerIDList,
bool  privateflag,
string  transactionID,
string  AGE,
string  transform
 

Overloaded Constructor

Parameters:
gameobj SPGameInterface - the game object to which this transaction will be associated with
master String - the master of this transaction
playerIDList String[] - players who will be associated with this transaction
privateflag boolean - private flag of this transaction
transactionID String - the id of this transaction
transform String - transform of secret


Member Function Documentation

SPAbstractTransactionInterface * SPTSecretClass::APIcreateTransaction SPGameInterface gameapiobj,
SPMessageClass message
[virtual]
 

Creates a new instance of an SPSecretClass class.

Parameters:
gameapiobj SPGameInterface - associated game object
message SPMessageClass - message that has all the transaction configure info
Returns:
SPAbstractTransactionInterface

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

string SPTSecretClass::APIgetSecret  ) 
 

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

Returns:
result - String - the secret

string SPTSecretClass::APIgetTransactionType  )  [virtual]
 

This method returns a String of the transactiontype.

Returns:
this.transtype - String - name of transaction type

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTSecretClass::APIrevealSecret string  sender,
vector< string >  recievers,
bool  listonly
 

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

Parameters:
sender String - the sender of the secret
recievers String[] - player ids of recievers
listonly boolean - false = for all players involved in the transaction or true = for players listed in this method as recievers
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

bool SPTSecretClass::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 Boolean flag to indicate success or failure.

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

SPAbstractTransactionInterface * SPTSecretClass::createSecret SPGameInterface gameobj,
string  master,
vector< string >  playerIDList,
bool  privateflag,
string  AGE,
string  newsecret
[static]
 

This method creates a SPSecretClass transaction.

Parameters:
gameobj - SPGameInterface - the game object
master - String - the transaction master
playerIDList 
privateflag 
AGE - String - Abstract Game Engine
newsecret 
Returns:
SPAbstractTransactionInterface - new object.

int SPTSecretClass::getPrpadlength  ) 
 

Getter function that returns the property: prpadlength

Returns:
prpadlength - int

string SPTSecretClass::getSecretpadded  ) 
 

Getter function that returns the property: secretpadded

Returns:
secretpadded - String

string SPTSecretClass::getSecrettransform  ) 
 

Getter function that returns the property: secrettransform

Returns:
secrettransform - String

string SPTSecretClass::gettranstype  )  [static]
 

This method gets the transaction type.

Returns:
String - secret

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTSecretClass::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 - Boolean: TRUE, if handled, FALSE, if not

bool SPTSecretClass::pronincomingTransaction SPMessageClass incoming  ) 
 

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

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

Reimplemented from SecurePlayLibrary::SPAbstractTransactionClass.

bool SPTSecretClass::registerTransaction  )  [static]
 

Registers this transaction.

Returns:
boolean


Member Data Documentation

const string SPTSecretClass::status_secretrevealed = "secretrevealed" [static, protected]
 

transaction status complete variable

const string SPTSecretClass::status_secretrevealedlist = "secretrevealedlist" [static, protected]
 

transaction status error variable

const string SPTSecretClass::status_secretsent = "secretsent" [static, protected]
 

transaction status ready variable


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.