org.jpos.security
Class KeySerialNumber

java.lang.Object
  extended by org.jpos.security.KeySerialNumber
All Implemented Interfaces:
java.io.Serializable, Loggeable

public class KeySerialNumber
extends java.lang.Object
implements java.io.Serializable, Loggeable

Key Serial Number (also called Key Name in the ANSI X9.24). Needed for deriving the Transaction Key when DUKPT (Derived Unique Key Per Transaction) method is used.
Refer to ANSI X9.24 for more information about DUKPT

See Also:
EncryptedPIN, Serialized Form

Constructor Summary
KeySerialNumber()
          Constructs a key serial number object
KeySerialNumber(java.lang.String baseKeyID, java.lang.String deviceID, java.lang.String transactionCounter)
          Constructs a key serial number object
 
Method Summary
 void dump(java.io.PrintStream p, java.lang.String indent)
          dumps Key Serial Number
 java.lang.String getBaseKeyID()
           
 java.lang.String getDeviceID()
           
 java.lang.String getTransactionCounter()
           
 void setBaseKeyID(java.lang.String baseKeyID)
           
 void setDeviceID(java.lang.String deviceID)
           
 void setTransactionCounter(java.lang.String transactionCounter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeySerialNumber

public KeySerialNumber()
Constructs a key serial number object


KeySerialNumber

public KeySerialNumber(java.lang.String baseKeyID,
                       java.lang.String deviceID,
                       java.lang.String transactionCounter)
Constructs a key serial number object

Parameters:
baseKeyID - a HexString representing the BaseKeyID (also called KeySet ID)
deviceID - a HexString representing the Device ID (also called TRSM ID)
transactionCounter - a HexString representing the transaction counter
Method Detail

setBaseKeyID

public void setBaseKeyID(java.lang.String baseKeyID)
Parameters:
baseKeyID - a HexString representing the BaseKeyID (also called KeySet ID)

getBaseKeyID

public java.lang.String getBaseKeyID()
Returns:
baseKeyID a HexString representing the BaseKeyID (also called KeySet ID)

setDeviceID

public void setDeviceID(java.lang.String deviceID)
Parameters:
deviceID - a HexString representing the Device ID (also called TRSM ID)

getDeviceID

public java.lang.String getDeviceID()
Returns:
deviceID a HexString representing the Device ID (also called TRSM ID)

setTransactionCounter

public void setTransactionCounter(java.lang.String transactionCounter)
Parameters:
transactionCounter - a HexString representing the transaction counter

getTransactionCounter

public java.lang.String getTransactionCounter()
Returns:
transactionCounter a HexString representing the transaction counter

dump

public void dump(java.io.PrintStream p,
                 java.lang.String indent)
dumps Key Serial Number

Specified by:
dump in interface Loggeable
Parameters:
p - a PrintStream usually supplied by Logger
indent - indention string, usually suppiled by Logger
See Also:
Loggeable