IAIK PKCS#11 Provider API Documentation
version 1.6

iaik.pkcs.pkcs11.provider
Class TokenKeyStoreFastSpi

java.lang.Object
  extended by java.security.KeyStoreSpi
      extended by iaik.pkcs.pkcs11.provider.TokenKeyStoreSpi
          extended by iaik.pkcs.pkcs11.provider.TokenKeyStoreFastSpi
All Implemented Interfaces:
PKCS11EngineClass

public class TokenKeyStoreFastSpi
extends TokenKeyStoreSpi

An adapter class to gain the possibility to instantiate an object that is an instance of KeyStore. This KeyStore implementation extends class TokenKeyStoreSpi and overwrites the method engineLoad and ensureCurrentTables() to achieve better performance. This is done by leaving out the checking for any external token changes, which is done in every KeyStore method when using TokenKeyStoreSpi. The FastPKCS11KeyStore can be instantiated with KeyStore.getInstance("FastPKCS11KeyStore"); or KeyStore.getInstance("FastPKCS11"); It can be used when the PKCS#11 token is not removed or changed and if no token entries are added, changed or removed with external tools. The FastPKCS11KeyStore can also be used, if the moment of external changes is known and the KeyStore is then manually updated by using tokenKeyStore.updateKeyStore().


Field Summary
 
Fields inherited from class iaik.pkcs.pkcs11.provider.TokenKeyStoreSpi
KEY_STORE_TYPE
 
Constructor Summary
TokenKeyStoreFastSpi()
           
TokenKeyStoreFastSpi(TokenManager tokenManager)
           
 
Method Summary
 void engineLoad(java.io.InputStream in, char[] password)
          Loads and initializes this key store.
 
Methods inherited from class iaik.pkcs.pkcs11.provider.TokenKeyStoreSpi
engineAliases, engineContainsAlias, engineDeleteEntry, engineGetCertificate, engineGetCertificateAlias, engineGetCertificateChain, engineGetCreationDate, engineGetKey, engineIsCertificateEntry, engineIsKeyEntry, engineSetCertificateEntry, engineSetKeyEntry, engineSetKeyEntry, engineSize, engineStore, getTokenManager, isSupportedBy
 
Methods inherited from class java.security.KeyStoreSpi
engineEntryInstanceOf, engineGetEntry, engineLoad, engineSetEntry, engineStore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenKeyStoreFastSpi

public TokenKeyStoreFastSpi()

TokenKeyStoreFastSpi

public TokenKeyStoreFastSpi(TokenManager tokenManager)
Method Detail

engineLoad

public void engineLoad(java.io.InputStream in,
                       char[] password)
                throws java.io.IOException,
                       java.lang.UnsupportedOperationException
Loads and initializes this key store. The user PIN may be provided as the password. If the application provides the PIN like this, the keystore will not prompt the password by other means. Please note that the keystore will keep a reference to the password object if it is provided.

Overrides:
engineLoad in class TokenKeyStoreSpi
Parameters:
in - The stream to load from.
password - The user PIN (or password) for the token.
Throws:
java.io.IOException - If the keystore cannot be loaded.
java.lang.UnsupportedOperationException - If getting the provider instance fails.
See Also:
KeyStoreSpi.engineLoad(InputStream,char[])

IAIK PKCS#11 Provider API Documentation
version 1.6

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.6