|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.crypto.keystore.RIMKeyStore
|
+--net.rim.device.api.crypto.keystore.PersistableRIMKeyStore
A persistable version of the rim key store that provides the functionality required to persist the rim key store. For sample code on how to use a key store see: here
| Field Summary | ||
|
protected PersistentObject |
_persist
The persistent store object that we use to store and retrieve the hash table containing the certificates and keys from the memory of the device. |
| Fields inherited from interface net.rim.device.api.crypto.keystore.KeyStore |
SECURITY_LEVEL_HIGH, SECURITY_LEVEL_LOW, SECURITY_LEVEL_MEDIUM, SECURITY_LEVEL_NOT_APPLICABLE |
| Constructor Summary | ||
|
PersistableRIMKeyStore(String name,
long id,
CodeSigningKey key,
PersistableRIMKeyStoreFactory factory)
This constructor initializes the hashtable and ensures that the hashtable is persisted correctly on the device. |
|
|
PersistableRIMKeyStore(String name,
long id,
CodeSigningKey key,
PersistableRIMKeyStoreFactory factory,
KeyStore keyStore)
This constructor allows one to construct a keystore given another key store. |
|
| Method Summary | ||
|
boolean |
addIndex(KeyStoreIndex index)
Adds an index to all of the information currently in the key store. |
|
void |
changePassword()
Changes the password for the underlying private keys in each of the KeystoreData classes and should NOT be called directly. |
|
void |
removeIndex(long index)
Removes the index from the key store and ensures that the aliases used to index key store information regarding this Index class will be removed. |
|
void |
removeKey(KeyStoreData data,
KeyStoreTicket ticket)
Removes this key store data from the key store and ensures that any links to this object are removed from the key store. |
| Methods inherited from class net.rim.device.api.crypto.keystore.RIMKeyStore |
addCollectionListener, addIndices, checkTicket, deleteKey, elements, elements, elements, elements, elements, elements, exists, existsIndex, getBackingKeyStore, getName, getTicket, getTicket, isMember, isMember, isMember, isMember, removeCollectionListener, set, set, set, set, set, set, set, set, size |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected PersistentObject _persist
| Constructor Detail |
public PersistableRIMKeyStore(String name, long id, CodeSigningKey key, PersistableRIMKeyStoreFactory factory) throws KeyStoreRegisterException
name - An identifying name for the keystore that can be displayed to the user.id - A unique long identifying the hashtable that will be persisted underneath
the key store. It is imperative that this is unique since you will overwrite someone
elses storage if this is identical to another long passed in. So, you should use your class
name or something unique to denote this keystore.key - a CodeSigningKey which can be used to prevent unauthorized access to your keystore.factory - The factory used to create the key store.KeyStoreRegisterException - thrown when there is an error registering this
class with the KeyStoreManager which is typically caused by one of three exceptions
being thrown in that method (ClassNotFoundException, InstantiationException, IllegalAccessException).public PersistableRIMKeyStore(String name, long id, CodeSigningKey key, PersistableRIMKeyStoreFactory factory, KeyStore keyStore) throws KeyStoreRegisterException
name - An identifying name for the keystore that can be displayed to the user.id - A long representing which key store this is. It has to be unique.key - a CodeSigningKey which can be used to prevent unauthorized access to your keystore.factory - The factory used to create the key store.keyStore - The secondary key store to search through for data.KeyStoreRegisterException - thrown when there is an error registering this
class with the KeyStoreManager which is typically caused by one of three exceptions
being thrown in that method (ClassNotFoundException, InstantiationException, IllegalAccessException).| Method Detail |
public boolean addIndex(KeyStoreIndex index)
KeyStoreaddIndex in class RIMKeyStore
KeyStoreindex - An Index class that is implemented by the developer.
It denotes how the key store information
is indexed according to fields currently contained in key store objects such
as certificates.public void changePassword()
KeyStoreKeyStoreData items in the
keystore.changePassword in class RIMKeyStorepublic void removeIndex(long index)
KeyStoreremoveIndex in class RIMKeyStore
KeyStoreindex - The long denoting the index class to remove.public void removeKey(KeyStoreData data, KeyStoreTicket ticket) throws KeyStoreCancelException
KeyStoreremoveKey in class RIMKeyStore
KeyStoredata - The data to be removed from the key store.ticket - A ticket denoting whether or not the developer has access to the keystore. A ticket can be retrieved
from the getTicket method in the key store or keystore data. The ticket can also be null which will most likely
prompt for a passphrase from the user automatically (essentially calls
getTicket for you).KeyStoreCancelException - Thrown if the user fails to enter a password.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.