PkgAgentSystem.Crypto
Class PersonalSecurityStoreFactory
java.lang.Object
|
+--PkgAgentSystem.Crypto.PersonalSecurityStoreFactory
- public class PersonalSecurityStoreFactory
- extends Object
Factory for creating PersonalSecurityStore
objects.
Currently returns either a PersonalSecurityStore
or a
IAIKSecurityStore
(if the IAIK provider is installed).
The latter can also create a new (and otherwise empty) security store,
which just contains a certificate for the agent system itself.
Customize subclasses by overriding getClassOfStore
.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
- See Also:
PersonalSecurityStore
,
IAIKSecurityStore
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersonalSecurityStoreFactory
protected PersonalSecurityStoreFactory()
openPersonalSecurityStore
public static final PersonalSecurityStore openPersonalSecurityStore(String filename,
char[] password)
throws FileNotFoundException,
KeyStoreException
- Loads a personal security store from a file.
- Parameters:
filename
- the name of the file containing the storepassword
- the password used for protecting the store- Returns:
- the loaded
PersonalSecurityStore
object - Throws:
FileNotFoundException
- if the file could not be foundKeyStoreException
- if an error occurs (wrong password, file damaged, ...)
createPersonalSecurityStore
public static final PersonalSecurityStore createPersonalSecurityStore()
throws KeyStoreException
- Creates a new personal security store.
- Returns:
- the newly created
PersonalSecurityStore
object - Throws:
KeyStoreException
- if an error occurs
getClassOfStore
protected String getClassOfStore(String filename)
- Retrieve the fully qualified name of the class which should be created. May depend e. g. on the
extension of the filename to load.
- Parameters:
filename
- the name of the file to load (or null if to create)- Returns:
- the name of the class which should be created
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.