All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----cryptix.pgp.KeyStore | +----cryptix.pgp.KeyRing
Note that a keyring is not automatically written out when it is destroyed.
The application must call
KeyRing is unlikely to be useful for any other subclasses. If you wish
to implement a general key retrieval class, use KeyStore instead.
If you wish to add file-specific behaviour, use PublicKeyRing or
SecretKeyRing.
Future changes
A
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
$Revision: 1.1.1.1 $
If their key is not available, the keyID is returned as a String.
This mimics PGP's behaviour.
You can't just add a Certificate - you need at least
a UserId and KeyRingTrust packet, and possibly
signatures and further UserIds as well.
KeyRingEntry contains all of this.
write() itself if it has added keys
that it wishes to keep.
remove()
function may be added.
All rights reserved.
KeyRing()
KeyRing(InputStream)
KeyRing(String)
add(KeyRingEntry)
checkSignatures()
checkSignatures(KeyStore)
dump(PrintStream)
getFullNameList(KeyID)
getFullUserNameList()
getIfBegins(Enumeration, String)
getKeyTrust(KeyID)
getPublicKey(EmailAddress)
getPublicKey(KeyID)
getSecretKey(EmailAddress, Passphrase)
getSecretKey(KeyID, Passphrase)
getUserName(KeyID)
init(PacketInputStream)
list(PrintStream)
write(OutputStream)
users
protected Hashtable users
addresses
protected Hashtable addresses
entriesById
protected Hashtable entriesById
KeyRing
protected KeyRing()
KeyRing
protected KeyRing(InputStream in) throws IOException
KeyRing
protected KeyRing(String filename) throws FileNotFoundException, IOException
init
protected abstract void init(PacketInputStream reader) throws IOException
getUserName
public final String getUserName(KeyID keyID)
add
public final void add(KeyRingEntry entry) throws FormatException
getFullNameList
public final String[] getFullNameList(KeyID keyID)
getFullUserNameList
public final String[] getFullUserNameList()
getPublicKey
protected final PublicKey getPublicKey(KeyID id)
getPublicKey
protected final PublicKey getPublicKey(EmailAddress address)
getSecretKey
protected final SecretKey getSecretKey(KeyID id,
Passphrase passphrase) throws DecryptException
getSecretKey
protected final SecretKey getSecretKey(EmailAddress address,
Passphrase passphrase) throws DecryptException
getIfBegins
protected final PublicKey getIfBegins(Enumeration e,
String username) throws IOException
write
public void write(OutputStream outputStream) throws IOException
checkSignatures
public boolean checkSignatures()
checkSignatures
public boolean checkSignatures(KeyStore store)
dump
public final void dump(PrintStream out)
list
public final void list(PrintStream out)
getKeyTrust
public int getKeyTrust(KeyID keyId)
All Packages Class Hierarchy This Package Previous Next Index