All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class distinct.rpc.PublicKeyDBYP

java.lang.Object
   |
   +----distinct.rpc.PublicKeyDB
           |
           +----distinct.rpc.PublicKeyDBYP

public class PublicKeyDBYP
extends PublicKeyDB
Connection to a NIS (Yellow Pages) publickey database for secure RPC keys.


Constructor Index

 o PublicKeyDBYP(String)
Creates an object that is connected to a NIS publickey database.
 o PublicKeyDBYP(String, String)
Creates an object that is connected to a NIS publickey database.

Method Index

 o getFirstName()
Method for enumerating the stored name.
 o getNextName()
Method for enumerating the stored name.
 o getPublicKey(String)
Returns the public key of an authority.
 o getSecretKey(String)
Returns the encrypted private key of an authority.

Constructors

 o PublicKeyDBYP
 public PublicKeyDBYP(String domainname) throws RPCError
Creates an object that is connected to a NIS publickey database. It assumes that a ypbind server is running on the executing machine.

Parameters:
domainname - The name of the domain.
Throws: RPCError
Thrown if something fails while connecting to the NIS.
 o PublicKeyDBYP
 public PublicKeyDBYP(String domainname,
                      String servername) throws RPCError
Creates an object that is connected to a NIS publickey database. Use this constructor if you do not run on a machine that has a local ypbind process running (usually a non-Unix) machine.

Parameters:
domainname - The name of the domain.
servername - The name of a machine that runs a ypbind server (Probably the server you want to connect to).
Throws: RPCError
Thrown if something fails while connecting to the NIS.

Methods

 o getPublicKey
 public String getPublicKey(String name) throws RPCError
Returns the public key of an authority.

Parameters:
name - The name of the authority.
Returns:
The stored public key of the requested authority in hex notation.
Throws: RPCError
Thrown if the key is not found in the database.
Overrides:
getPublicKey in class PublicKeyDB
 o getSecretKey
 public String getSecretKey(String name) throws RPCError
Returns the encrypted private key of an authority.

Parameters:
name - The name of the authority.
Returns:
The stored encrypted private key of the requested authority in hex notation.
Throws: RPCError
Thrown if the key is not found in the database.
Overrides:
getSecretKey in class PublicKeyDB
 o getFirstName
 public String getFirstName()
Method for enumerating the stored name. Returns the first stored name. Use getNextName to retrieve the subsequent entries.

Returns:
The first stored name. Null if no names are stored.
Overrides:
getFirstName in class PublicKeyDB
 o getNextName
 public String getNextName()
Method for enumerating the stored name. Returns the next stored name. Use getFirstName to initialize an enumeration.

Returns:
The next stored name. Null if no further names are stored.
Overrides:
getNextName in class PublicKeyDB

All Packages  Class Hierarchy  This Package  Previous  Next  Index