All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.pgp.KeyRingEntry

java.lang.Object
   |
   +----cryptix.pgp.KeyRingEntry

public final class KeyRingEntry
extends Object
Stores all the information about a user in a keyring - their key certificate, usernames, trust packet(s) and any signatures.

This is used by the KeyRing classes to read in keys, and the KeyClient classes to convert retrieved key blocks.


Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Author:
Ian Brown

Constructor Index

 o KeyRingEntry(Certificate, KeyRingTrust)
Creates a new KeyRingEntry with these parameters.
 o KeyRingEntry(Certificate, KeyRingTrust, Vector)
Creates a new KeyRingEntry with these parameters.
 o KeyRingEntry(PacketInputStream, KeyRingTrust)
Reads in a KeyRingEntry from reader.

Method Index

 o addNameAndSignatures(UserId, KeyRingTrust, Vector, Vector)
Adds these names, trust packets and signatures to this entry.
 o certificate()
Returns the certificate contained in this entry.
 o checkSignatures(KeyStore)
Checks the signatures on this entry using the keys in store.
 o getUserIdCertificates()
Returns an array containing all the user ID certificates contained in this entry.
 o primaryName()
Keys may be associated with more than one name and e-mail address, but PGP assumes the first user ID certificate after the key is the most important one.
 o publicKey()
Returns the public key contained in this entry.
 o toString()
Converts the entry to a String which contains the certificate, user names and their associated trust and signature packets.
 o trustValue()
How well is the key trusted overall?
 o write(DataOutput)
Writes out this entry as a series of PGP packets to out.

Constructors

 o KeyRingEntry
 public KeyRingEntry(Certificate certificate,
                     KeyRingTrust certificateTrust)
Creates a new KeyRingEntry with these parameters.

 o KeyRingEntry
 public KeyRingEntry(Certificate certificate,
                     KeyRingTrust certificateTrust,
                     Vector userCerts)
Creates a new KeyRingEntry with these parameters.

 o KeyRingEntry
 public KeyRingEntry(PacketInputStream reader,
                     KeyRingTrust defaultTrust) throws IOException
Reads in a KeyRingEntry from reader.

If the entry does not contain any trust information (i.e. is from a secret keyring or a keyserver) assign the entry defaultTrust.

Methods

 o addNameAndSignatures
 public void addNameAndSignatures(UserId userName,
                                  KeyRingTrust utrust,
                                  Vector signatures,
                                  Vector trusts) throws FormatException
Adds these names, trust packets and signatures to this entry.

 o trustValue
 public int trustValue()
How well is the key trusted overall?

 o certificate
 public Certificate certificate()
Returns the certificate contained in this entry.

 o publicKey
 public PublicKey publicKey()
Returns the public key contained in this entry.

If the entry contains a secret key, null is returned.

 o getUserIdCertificates
 public UserIdCertificate[] getUserIdCertificates()
Returns an array containing all the user ID certificates contained in this entry.

 o primaryName
 public String primaryName()
Keys may be associated with more than one name and e-mail address, but PGP assumes the first user ID certificate after the key is the most important one. This method returns that name.

 o toString
 public String toString()
Converts the entry to a String which contains the certificate, user names and their associated trust and signature packets.

Overrides:
toString in class Object
 o checkSignatures
 public boolean checkSignatures(KeyStore store)
Checks the signatures on this entry using the keys in store.

Parameters:
store - where to retrieve public keys from
 o write
 public void write(DataOutput out) throws IOException
Writes out this entry as a series of PGP packets to out.


All Packages  Class Hierarchy  This Package  Previous  Next  Index