SecurePlayLibray J2SE
v2.1

com.SecurePlay
Class SPTMultiPartSecretClass

java.lang.Object
  extended bycom.SecurePlay.SPRootTransactionClass
      extended bycom.SecurePlay.SPAbstractTransactionClass
          extended bycom.SecurePlay.SPTMultiPartSecretClass
All Implemented Interfaces:
SPAbstractTransactionInterface

public class SPTMultiPartSecretClass
extends SPAbstractTransactionClass

This method is an extension of the SPSecret Class to handle multi-part (String Array) secrets

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
private static java.lang.String mt_revealSecret
          Static message types that this transaction supports.
private  int prpadlength
          This is a private,constant property.
private  java.lang.String[] secret
          This is the secret that is being protected through the Secret transaction.
private  java.lang.String secretpadding
          This property holds the secret string padded with its random string to protect against dictionary attacks.
private  java.lang.String secrettransform
          This property is the irreversible transform of the secretpadded string.
protected static java.lang.String status_secretrevealed
          transaction status complete variable
protected static java.lang.String status_secretrevealedlist
          transaction status error variable
protected static java.lang.String status_secretsent
          transaction status ready variable
 
Fields inherited from class com.SecurePlay.SPAbstractTransactionClass
AGE, configuration, gameinstance, mt_completeTransaction, mt_error, privateflag, releaseversion, status_error, status_ready, transactionstatus, transtype
 
Fields inherited from class com.SecurePlay.SPRootTransactionClass
comms, EventListenerList, gameID, insend, master, playerIDList, ReSend_altmessage, ReSend_encryptflag, ReSend_messagebody, ReSend_messageID, ReSend_messagetype, ReSend_privateflag, ReSend_receivers, ReSend_sender, secureplay, transactionID
 
Constructor Summary
private SPTMultiPartSecretClass()
          Default Constructor.
  SPTMultiPartSecretClass(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String transactionID, java.lang.String AGE, java.lang.String transform)
          Overloaded Constructor
 
Method Summary
 SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj, SPMessageClass message)
          Creates a new instance of an SPMutliPartSecretClass class.
 java.lang.String[] APIgetSecret()
          This method returns the actual secret that this transaction is protecting, if available.
 java.lang.String APIgetTransactionType()
          This method returns a String of the transactiontype.
 boolean APIrevealSecret(java.lang.String sender, java.lang.String[] recievers, boolean listflag)
          This method sends the secretpadded value to the specified remote players.
 boolean APIverifySecret()
          This method verifies the paddedsecret that was sent.
static SPAbstractTransactionInterface createMultiPartSecret(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String AGE, java.lang.String[] newsecret)
          This method creates a SPMutliPartSecretClass transaction.
 int getPrpadlength()
          Getter function that returns the property: prpadlength
 java.lang.String getSecretpadding()
          Getter function that returns the property: secretpadding
 java.lang.String getSecrettransform()
          Getter function that returns the property: secrettransform
static java.lang.String gettranstype()
          This method gets the transaction type.
 boolean onrevealSecret(SPMessageClass incoming)
          This method handles the incoming message to reveal a secret.
protected  boolean pronincomingTransaction(SPMessageClass incoming)
          This method provides the unique handlers for incoming Multipart Secret turn message types
static boolean registerTransaction()
          Registers this transaction.
 java.lang.String setSecretTransform()
           
 
Methods inherited from class com.SecurePlay.SPAbstractTransactionClass
APIcompleteTransaction, APIgetAGE, APIgetConfiguration, APIgetGameinstance, APIgetPrivacyFlag, APIgetTransactionstatus, APIisPlayerInternal, APIisTransError, APIsetTransactionID, logError, onincomingTransaction, prinit, pruniqueinit, setAGE
 
Methods inherited from class com.SecurePlay.SPRootTransactionClass
APIaddListener, APIclearListeners, APIgetGameID, APIgetGetReplayList, APIgetListenerCount, APIgetListeners, APIgetMaster, APIgetPlayerIDList, APIgetTransactionID, APIisPlayerIncluded, APIremoveListener, APIReplayRemoveOldSender, APIresendLastMessage, APIsetReplayList, APIsetSecurePlayClass, detectReplay, sendMessage, SPnotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.SecurePlay.SPAbstractTransactionInterface
APIgetGameID, APIgetMaster, APIgetPlayerIDList, APIgetTransactionID, sendMessage
 

Field Detail

prpadlength

private final int prpadlength
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.

See Also:
Constant Field Values

secret

private java.lang.String[] secret
This is the secret that is being protected through the Secret transaction.


secretpadding

private java.lang.String secretpadding
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.


secrettransform

private java.lang.String secrettransform
This property is the irreversible transform of the secretpadded string. The secrettransform is sent first to make the secret unmodifiable.


mt_revealSecret

private static final java.lang.String mt_revealSecret
Static message types that this transaction supports.

See Also:
Constant Field Values

status_secretsent

protected static final java.lang.String status_secretsent
transaction status ready variable

See Also:
Constant Field Values

status_secretrevealed

protected static final java.lang.String status_secretrevealed
transaction status complete variable

See Also:
Constant Field Values

status_secretrevealedlist

protected static final java.lang.String status_secretrevealedlist
transaction status error variable

See Also:
Constant Field Values
Constructor Detail

SPTMultiPartSecretClass

private SPTMultiPartSecretClass()
Default Constructor.


SPTMultiPartSecretClass

public SPTMultiPartSecretClass(SPGameInterface gameobj,
                               java.lang.String master,
                               java.lang.String[] playerIDList,
                               boolean privateflag,
                               java.lang.String transactionID,
                               java.lang.String AGE,
                               java.lang.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
Method Detail

APIrevealSecret

public boolean APIrevealSecret(java.lang.String sender,
                               java.lang.String[] recievers,
                               boolean listflag)
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
listflag - boolean - if using list parameter TRUE, if all transaction members, FALSE
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIverifySecret

public boolean 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

APIgetSecret

public java.lang.String[] APIgetSecret()
This method returns the actual secret that this transaction is protecting, if available.

Returns:
result - String - the secret

onrevealSecret

public boolean 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

pronincomingTransaction

protected boolean pronincomingTransaction(SPMessageClass incoming)
This method provides the unique handlers for incoming Multipart Secret turn message types

Overrides:
pronincomingTransaction in class SPAbstractTransactionClass
Parameters:
incoming - SPMessageClass - incoming message
Returns:
Boolean - TRUE if successful, FALSE, if unsuccessful

getPrpadlength

public int getPrpadlength()
Getter function that returns the property: prpadlength

Returns:
prpadlength - int

getSecretpadding

public java.lang.String getSecretpadding()
Getter function that returns the property: secretpadding

Returns:
secretpadding - String

getSecrettransform

public java.lang.String getSecrettransform()
Getter function that returns the property: secrettransform

Returns:
secrettransform - String

gettranstype

public static java.lang.String gettranstype()
This method gets the transaction type.

Returns:
String

registerTransaction

public static boolean registerTransaction()
Registers this transaction.

Returns:
boolean

createMultiPartSecret

public static SPAbstractTransactionInterface createMultiPartSecret(SPGameInterface gameobj,
                                                                   java.lang.String master,
                                                                   java.lang.String[] playerIDList,
                                                                   boolean privateflag,
                                                                   java.lang.String AGE,
                                                                   java.lang.String[] newsecret)
This method creates a SPMutliPartSecretClass transaction.

Parameters:
gameobj -
master -
playerIDList -
privateflag -
AGE -
newsecret -
Returns:
SPAbstractTransactionInterface - returns MultiPartSecret transaction created.

APIcreateTransaction

public SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj,
                                                           SPMessageClass message)
Creates a new instance of an SPMutliPartSecretClass class.

Specified by:
APIcreateTransaction in interface SPAbstractTransactionInterface
Overrides:
APIcreateTransaction in class SPAbstractTransactionClass
Parameters:
gameapiobj - SPGameInterface - game associated with this transaction.
message - SPMessageClass - message that has all the transaction configure info
Returns:
SPAbstractTransactionInterface

APIgetTransactionType

public java.lang.String APIgetTransactionType()
This method returns a String of the transactiontype.

Specified by:
APIgetTransactionType in interface SPAbstractTransactionInterface
Overrides:
APIgetTransactionType in class SPAbstractTransactionClass
Returns:
this.transtype - String - name of transaction type

setSecretTransform

public java.lang.String setSecretTransform()

SecurePlayLibray J2SE
v2.1

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.