All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.pgp.SecretKeyRing

java.lang.Object
   |
   +----cryptix.pgp.KeyStore
           |
           +----cryptix.pgp.KeyRing
                   |
                   +----cryptix.pgp.SecretKeyRing

public final class SecretKeyRing
extends KeyRing
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 $

Author:
Mike Wynn, Ian Brown

Constructor Index

 o SecretKeyRing()
Creates an empty secret keyring object.
 o SecretKeyRing(InputStream)
Creates a new secret keyring object from in.
 o SecretKeyRing(String)
Create a new secret keyring object from the file filename.

Method Index

 o getKey(EmailAddress, Passphrase)
Retrieves a key by any of the e-mail addresses on it.
 o getKey(KeyID)
DON'T USE THIS - it's only here to allow SecretKeyRing to fit into this class hierarchy.
 o getKey(KeyID, Passphrase)
Retrieves a key by its ID.
 o getKey(String)
DON'T USE THIS - it's only here to allow SecretKeyRing to fit into this class hierarchy.
 o getKey(String, Passphrase)
Retrieves a key by any of the user names on it.
 o getKeyTrust(KeyID)
How much is the key with ID keyId trusted by this user?
 o init(PacketInputStream)
Subclasses should override this method to read entries from an InputStream.

Constructors

 o SecretKeyRing
 protected SecretKeyRing()
Creates an empty secret keyring object. Use the add method to add new entries.

 o SecretKeyRing
 public SecretKeyRing(InputStream in) throws IOException
Creates a new secret keyring object from in.

Throws: IOException
if there was an I/O error
 o SecretKeyRing
 public SecretKeyRing(String filename) throws FileNotFoundException, IOException
Create a new secret keyring object from the file filename.

Throws: FileNotFoundException
if filename was not found
Throws: IOException
if there was an I/O error

Methods

 o getKey
 public final PublicKey getKey(String username) throws FormatException
DON'T USE THIS - it's only here to allow SecretKeyRing to fit into this class hierarchy. null is always returned as a passphrase is needed to decrypt the key first.

Overrides:
getKey in class KeyStore
 o getKey
 public final SecretKey getKey(String username,
                               Passphrase passphrase) throws IOException, DecryptException
Retrieves a key by any of the user names on it.

Throws: IOException
if there was an I/O error
Throws: DecryptException
if the key could not be decrypted
 o getKey
 public final PublicKey getKey(KeyID keyID)
DON'T USE THIS - it's only here to allow SecretKeyRing to fit into this class hierarchy. null is always returned as a passphrase is needed to decrypt the key first.

Overrides:
getKey in class KeyStore
 o getKey
 public final SecretKey getKey(KeyID keyID,
                               Passphrase passphrase) throws DecryptException
Retrieves a key by its ID.

Throws: DecryptException
if the key could not be decrypted
 o getKey
 public final SecretKey getKey(EmailAddress address,
                               Passphrase passphrase) throws DecryptException
Retrieves a key by any of the e-mail addresses on it.

Throws: DecryptException
if the key could not be decrypted
 o getKeyTrust
 public final int getKeyTrust(KeyID keyId)
How much is the key with ID keyId trusted by this user?

Overrides:
getKeyTrust in class KeyRing
 o init
 protected final void init(PacketInputStream reader) throws IOException
Subclasses should override this method to read entries from an InputStream.

Overrides:
init in class KeyRing

All Packages  Class Hierarchy  This Package  Previous  Next  Index