iaik.smime.ess.utils
Interface KeyDatabase

All Superinterfaces:
CertificateDatabase
All Known Implementing Classes:
EncryptedKeyStoreDatabase, KeyStoreDatabase

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

getKey

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.

Parameters:
keyID - the key identifier identifying the entity to which the requested key belongs to
Returns:
the key belonging to the given key identifier or null if there is no key for this identifier
Throws:
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 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC