iaik.tc.tss.api.tspi
Interface TcIMonotonicCtr

All Superinterfaces:
TcIAttributes, TcIAuthObject

public interface TcIMonotonicCtr
extends TcIAttributes, TcIAuthObject

This class is used to store information about a monotonic counter inside the TPM, for use when defining, releasing, reading or incrementing such a counter.


Method Summary
 Object[] createCtr(TcBlobData label)
          This method creates the counter with the label provided.
 Object incrementCtr()
          This method increments a previously defined counter.
 long readCtr()
          This method reads the counter value.
 void releaseCtr()
          This method releases the counter.
 
Methods inherited from interface TcIAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 
Methods inherited from interface TcIAuthObject
changeAuth, changeAuthAsym, getPolicyObject, getUsagePolicyObject
 

Method Detail

createCtr

Object[] createCtr(TcBlobData label)
                   throws TcTssException
This method creates the counter with the label provided. Note that this command requires owner authorization which can be set via the usage policy of the TPM object.

Parameters:
label - The label value used to identify this counter
Returns:
0 ... The handle for the counter (Long) 1 ... The starting counter value (TcTpmCounterValue)
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
381

releaseCtr

void releaseCtr()
                throws TcTssException
This method releases the counter. Note that this command requires owner authorization which can be set via the usage policy of the TPM object.

Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
383

incrementCtr

Object incrementCtr()
                    throws TcTssException
This method increments a previously defined counter. A policy object must be assigned to this object; the authData within the policy object will be used to authorize this operation.

Returns:
The new TcTpmCounterValue post increment
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
384

readCtr

long readCtr()
             throws TcTssException
This method reads the counter value.

Returns:
The current value of the counter
Throws:
TcTssException