iaik.tc.tss.impl.java.tcs.kcmgr
Class TcTcsKeyCache

java.lang.Object
  extended by iaik.tc.tss.impl.java.tcs.kcmgr.TcTcsKeyCache
Direct Known Subclasses:
TcTcsKeyCacheTpm11, TcTcsKeyCacheTpm11NoSwap, TcTcsKeyCacheTpm12, TcTcsKeyCacheVista

public abstract class TcTcsKeyCache
extends java.lang.Object


Method Summary
 long ensureKeyIsLoadedInTpm(long khTcs)
          This method takes a TCS key handle and tries to ensure that the corresponding key is loaded in the TPM.
static TcTcsKeyCache getInstance()
          This class can only be instantiated once (Singleton).
abstract  boolean swapOutKeyNotParent(long khTpmParent)
          This method frees TPM space by swapping out the first key that does not match the provided parent key handle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TcTcsKeyCache getInstance()
                                 throws TcTddlException,
                                        TcTpmException,
                                        TcTcsException
This class can only be instantiated once (Singleton).

Throws:
TcTddlException
TcTpmException
TcTcsException

swapOutKeyNotParent

public abstract boolean swapOutKeyNotParent(long khTpmParent)
                                     throws TcTddlException,
                                            TcTpmException,
                                            TcTcsException
This method frees TPM space by swapping out the first key that does not match the provided parent key handle. This allows the caller to specify a key that has to remain inside the TPM.

Parameters:
khTpmParent - The TPM key handle of the parent that should remain in the TPM.
Returns:
Returns true if space could be freed (by swapping out keys), false otherwise.
Throws:
TcTpmException - This exception is thrown if accessing the TPM fails.
TcTddlException
TcTcsException

ensureKeyIsLoadedInTpm

public long ensureKeyIsLoadedInTpm(long khTcs)
                            throws TcTddlException,
                                   TcTpmException,
                                   TcTcsException
This method takes a TCS key handle and tries to ensure that the corresponding key is loaded in the TPM. On success, the TPM key handle is returned. The method performs the following steps:
On success, the TPM key handle corresponding to the given TCS key handle is returned.

Parameters:
khTcs - The TCS key handle of the key that should be loaded in the TPM.
Returns:
The TPM key handle corresponding to the given TCS key handle.
Throws:
TcTcsException - This exception is thrown if the provided key handle is unknown of the key is not loaded in the TPM, and also could not be loaded from the key cache.
TcTpmException
TcTddlException