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.
-
PublicKeyDBYP(String)
- Creates an object that is connected to a NIS publickey database.
-
PublicKeyDBYP(String, String)
- Creates an object that is connected to a NIS publickey database.
-
getFirstName()
- Method for enumerating the stored name.
-
getNextName()
- Method for enumerating the stored name.
-
getPublicKey(String)
- Returns the public key of an authority.
-
getSecretKey(String)
- Returns the encrypted private key of an authority.
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.
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.
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
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
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
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