iaik.tc.tss.impl.java.tsp
Class TcPcrCompositeBase

java.lang.Object
  extended by iaik.tc.tss.impl.java.tsp.TcAttributes
      extended by iaik.tc.tss.impl.java.tsp.TcWorkingObject
          extended by iaik.tc.tss.impl.java.tsp.TcPcrCompositeBase
All Implemented Interfaces:
TcIAttributes, TcIPcrComposite, TcIWorkingObject
Direct Known Subclasses:
TcPcrCompositeInfo, TcPcrCompositeInfoLong, TcPcrCompositeInfoShort

public abstract class TcPcrCompositeBase
extends TcWorkingObject
implements TcIPcrComposite


Constructor Summary
TcPcrCompositeBase(int numPcrs)
          Construct structure offline.
 
Method Summary
 long getAttribPcrStruct(long subFlag)
          This method is used to get PCR composite attributes.
 TcBlobData getPcrValue(long pcrIndex)
          This method returns the digest value of a given PCR index inside a PCR composite object.
 void setAttribPcrStruct(long subFlag, long attrib)
          This method is used to set PCR composite attributes.
abstract  java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface iaik.tc.tss.api.tspi.TcIPcrComposite
getPcrCompositeHash, getPcrLocality, selectPcrIndex, selectPcrIndexEx, setPcrLocality, setPcrValue
 
Methods inherited from interface iaik.tc.tss.api.tspi.TcIAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 

Constructor Detail

TcPcrCompositeBase

public TcPcrCompositeBase(int numPcrs)
Construct structure offline.

Parameters:
numPcrs -
Method Detail

toString

public abstract java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

getPcrValue

public TcBlobData getPcrValue(long pcrIndex)
                       throws TcTssException
Description copied from interface: TcIPcrComposite
This method returns the digest value of a given PCR index inside a PCR composite object. Multiple PCR values for different indices can be retrieved by calling this method multiple times on a PCR composite object.
This method may be used to get PCR values in a PCR composite object regardless of the PCR structure type (TcTpmPcrInfo, TcTpmPcrInfoShort or TcTpmPcrInfoLong).
If a TcTpmPcrInfoLong is used, this method returns the digestAtRelease.

Specified by:
getPcrValue in interface TcIPcrComposite
Parameters:
pcrIndex - The index of the PCR to read.
Returns:
The contents of PCR specified by pcrIndex.
Throws:
TcTssException

setAttribPcrStruct

public void setAttribPcrStruct(long subFlag,
                               long attrib)
                        throws TcTssException
This method is used to set PCR composite attributes. The only attribute defined in the TSS specification is the PCR composite structure attribute. Since it makes little sense to change the underlying structure after the PCR composite object was created, this attribute is not supported. To specify the underlying struct version, use the init flags upon object creation. Note that this method is not standardized as part of the TSP Interface (TSPI).

Throws:
{@link - TcTssException}
TcTssException

getAttribPcrStruct

public long getAttribPcrStruct(long subFlag)
                        throws TcTssException
This method is used to get PCR composite attributes. Note that this method is not standardized as part of the TSP Interface (TSPI).

Parameters:
subFlag - Valid subFlags are:
Returns:
The type of internal PCR data structure. This can be of type TcTssConstants.TSS_PCRS_STRUCT_INFO, TcTssConstants.TSS_PCRS_STRUCT_INFO_SHORT or TcTssConstants.TSS_PCRS_STRUCT_INFO_LONG.
Throws:
{@link - TcTssException}
TcTssException