|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcryptix.pgp.KeyStore
cryptix.pgp.KeyRing
cryptix.pgp.SecretKeyRing
Represents a secret keyring. Use the getKey() functions
to retrieve a key.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.1.1.1 $
| Field Summary |
| Fields inherited from class cryptix.pgp.KeyRing |
addresses, entriesById, users |
| Constructor Summary | |
protected |
SecretKeyRing()
Creates an empty secret keyring object. |
|
SecretKeyRing(java.io.InputStream in)
Creates a new secret keyring object from in. |
|
SecretKeyRing(java.lang.String filename)
Create a new secret keyring object from the file filename. |
| Method Summary | |
SecretKey |
getKey(EmailAddress address,
Passphrase passphrase)
Retrieves a key by any of the e-mail addresses on it. |
PublicKey |
getKey(KeyID keyID)
DON'T USE THIS - it's only here to allow SecretKeyRing to fit into this class hierarchy. |
SecretKey |
getKey(KeyID keyID,
Passphrase passphrase)
Retrieves a key by its ID. |
PublicKey |
getKey(java.lang.String username)
DON'T USE THIS - it's only here to allow SecretKeyRing to fit into this class hierarchy. |
SecretKey |
getKey(java.lang.String username,
Passphrase passphrase)
Retrieves a key by any of the user names on it. |
int |
getKeyTrust(KeyID keyId)
How much is the key with ID keyId trusted by this user? |
protected void |
init(PacketInputStream reader)
Subclasses should override this method to read entries from an InputStream. |
| Methods inherited from class cryptix.pgp.KeyRing |
add, checkSignatures, checkSignatures, dump, getFullNameList, getFullUserNameList, getIfBegins, getPublicKey, getPublicKey, getSecretKey, getSecretKey, getUserName, list, write |
| Methods inherited from class cryptix.pgp.KeyStore |
checkSignature, checkSignature, checkSignature |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected SecretKeyRing()
add
method to add new entries.
public SecretKeyRing(java.io.InputStream in)
throws java.io.IOException
java.io.IOException - if there was an I/O error
public SecretKeyRing(java.lang.String filename)
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException - if filename was not found
java.io.IOException - if there was an I/O error| Method Detail |
public final PublicKey getKey(java.lang.String username)
throws FormatException
null is always returned as a
passphrase is needed to decrypt the key first.
getKey in class KeyStoreFormatException
public final SecretKey getKey(java.lang.String username,
Passphrase passphrase)
throws java.io.IOException,
DecryptException
java.io.IOException - if there was an I/O error
DecryptException - if the key could not be decryptedpublic final PublicKey getKey(KeyID keyID)
null is always returned as a
passphrase is needed to decrypt the key first.
getKey in class KeyStore
public final SecretKey getKey(KeyID keyID,
Passphrase passphrase)
throws DecryptException
DecryptException - if the key could not be decrypted
public final SecretKey getKey(EmailAddress address,
Passphrase passphrase)
throws DecryptException
DecryptException - if the key could not be decryptedpublic final int getKeyTrust(KeyID keyId)
KeyRing
getKeyTrust in class KeyRing
protected final void init(PacketInputStream reader)
throws java.io.IOException
KeyRing
init in class KeyRingjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||