Class TR31OptionalDataBlock

java.lang.Object
com.ibm.crypto.hdwrCCA.provider.TR31OptionalDataBlock

public class TR31OptionalDataBlock extends 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 Details

    • TR31OptionalDataBlock

      public TR31OptionalDataBlock(String id, 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 Details

    • getOptDataID

      public 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 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 String toString()
      Returns a formatted string displaying the contents of the Optional Data Block.
      Overrides:
      toString in class Object
      Returns:
      a formatted string displaying the contents of the Optional Data Block.
    • toString

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