|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopencard.opt.security.CredentialStore
public abstract class CredentialStore
A container for cryptographic credentials.
Smartcards may protect access to the data stored on them by means of
cryptography. The card services that are used to access that data will
then require credentials to overcome this protection. The cryptographic
algorithms that have to be used depend on the smartcard's OS. The kind
of credential that has to be presented to the card service depends on
the algorithm to support as well as on the service. For example, if the
algorithm is DES, the credential may be a DES key, or an implementation
of the DES algorithm for a specific key.
As a result of these dependencies, card services supporting a particular
smartcard or smartcard family will define specific credentials that have
to be provided to them. Additionally, they will define a store into which
only these credentials can be put. This class is the abstract base class
of such stores. Methods to put credentials into it as well as to retrieve
them have to be added in dervied classes, since at least the type of the
credentials is service specific.
Applications will collect their credentials for a specific smartcard in
a credential store. Credential stores are collected in instances of class
CredentialBag, so the same application may support different
smartcards without having to worry about which one is inserted.
Credential
,
CredentialBag
,
CardService
Constructor Summary | |
---|---|
protected |
CredentialStore()
Creates a new generic store for credentials. |
Method Summary | |
---|---|
protected Credential |
fetchCredential(java.lang.Object credID)
Retrieves a credential. |
protected java.util.Enumeration |
getCredentialIDs()
Gets the identifiers of all credentials stored. |
static CredentialStore |
getInstance(java.lang.String className)
Instantiates a new credential store. |
protected void |
storeCredential(java.lang.Object credID,
Credential cred)
Stores a credential. |
abstract boolean |
supports(CardID cardID)
Tests whether this store supports a particular card. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CredentialStore()
Method Detail |
---|
public abstract boolean supports(CardID cardID)
cardID
- the ATR of the smartcard to test for
public static CredentialStore getInstance(java.lang.String className)
className
- a subclass of CredentialStore to instantiate
protected final void storeCredential(java.lang.Object credID, Credential cred)
credID
- an identifier for the credentialcred
- the credential to be storedfetchCredential(java.lang.Object)
,
Hashtable
,
Object.hashCode()
,
Object.equals(java.lang.Object)
protected final Credential fetchCredential(java.lang.Object credID)
credID
- an identifier for the credential to retrieve
storeCredential(java.lang.Object, opencard.opt.security.Credential)
protected final java.util.Enumeration getCredentialIDs()
storeCredential(java.lang.Object, opencard.opt.security.Credential)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |