Interface KeyDatabase

All Superinterfaces:
All Known Implementing Classes:

public interface KeyDatabase
extends CertificateDatabase

A simple key database allowing to query for (private, secret) keys based on their key identifiers. The key maybe required to, for instance, decrypt an encrypted S/MIME message (content encryption key).
If private keys are held by this key database it also may allow to access the corresponding certificate chain.

Method Summary
 java.security.Key getKey(KeyIdentifier keyID)
          Gets the key belonging to the given key identidier.
Methods inherited from interface iaik.smime.ess.utils.CertificateDatabase
getCertificate, getCertificateChain

Method Detail


java.security.Key getKey(KeyIdentifier keyID)
                         throws KeyDatabaseException
Gets the key belonging to the given key identidier. An application implementing this interface may decide about the way the (e.g. private) key is accessed; e.g. by poping up a dialog asking to enter a password for decrypting the a PBE protected key.

keyID - the key identifier identifying the entity to which the requested key belongs to
the key belonging to the given key identifier or null if there ís no key for this identifier
KeyDatabaseException - if there occurs some problem when trying to fetch the key

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 5.1, (c) 2002 IAIK, (c) 2003 - 2010 SIC