- java.lang.Object
-
- com.ibm.crypto.hdwrCCA.provider.TR31OptionalDataBlock
-
public class TR31OptionalDataBlock extends java.lang.Object
This class represents one Optional Data Block in a TR-31 KeyBlock. This class is provided to allow applications to specify optional data blocks for a TR-31 KeyBlock and to extract optional data blocks from a TR-31 KeyBlock.
-
-
Constructor Summary
Constructors Constructor Description TR31OptionalDataBlock(java.lang.String id, java.lang.String data)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getOptData()
Returns the contents of the optional data block data field.java.lang.String
getOptDataID()
Returns the contents of the optional data block ID field.java.lang.String
toString()
Returns a formatted string displaying the contents of the Optional Data Block.java.lang.String
toString(int indent)
Returns a formatted string displaying the contents of this Optional Data Block.
-
-
-
Constructor Detail
-
TR31OptionalDataBlock
public TR31OptionalDataBlock(java.lang.String id, java.lang.String data)
Constructor- Parameters:
id
- a two character string identifier for the optional data block, defined by the user creating the TR-31 Key Block or by the user that will receive the TR-31 Key Block.data
- a free form string that is the data in the optional data block. This could be a value defined by the user creating the TR-31 Key Block or by the user that will receive the TR-31 Key Block; it could be a free form note describing the TR-31 Key Block; it could be a note used for communication between the creator of the TR-31 Key Block and the receiver of the TR-31 Key Block; it could be some other string meaningful to one of the parties.
-
-
Method Detail
-
getOptDataID
public java.lang.String getOptDataID()
Returns the contents of the optional data block ID field. This is a two-byte string.- Returns:
- the contents of the the optional data block ID field. This is a two-byte string.
-
getOptData
public java.lang.String getOptData()
Returns the contents of the optional data block data field.- Returns:
- the contents of the the optional data block data field.
-
toString
public java.lang.String toString()
Returns a formatted string displaying the contents of the Optional Data Block.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a formatted string displaying the contents of the Optional Data Block.
-
toString
public java.lang.String toString(int indent)
Returns a formatted string displaying the contents of this Optional Data Block.- Parameters:
indent
- for use when this is part of a TR31KeyBlock toString(). Each line of output will have a prefix of indent*4 spaces.- Returns:
- a formatted string displaying the contents of this Optional Data Block.
-
-