## net.i2p.router
Class KeyManager

    java.lang.Object
      net.i2p.router.KeyManager

public class KeyManager
extends java.lang.Object

Maintain all of the key pairs for the router.

Field Summary
`static java.lang.String` `DEFAULT_KEYDIR`
`static java.lang.String` `PROP_KEYDIR`

Constructor Summary
`KeyManager(RouterContext context)`

Method Summary
`java.util.Set` `getAllKeys()`
`LeaseSetKeys` `getKeys(Destination dest)`
`LeaseSetKeys` `getKeys(Hash dest)`
`PrivateKey` `getPrivateKey()`
`PublicKey` `getPublicKey()`
`SigningPrivateKey` `getSigningPrivateKey()`
`SigningPublicKey` `getSigningPublicKey()`
`void` `registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, PrivateKey endpointDecryptionKey)`
`void` `setPrivateKey(PrivateKey key)` Configure the router's private key
`void` `setPublicKey(PublicKey key)` Configure the router's public key
`void` `setSigningPrivateKey(SigningPrivateKey key)` Configure the router's signing private key
`void` `setSigningPublicKey(SigningPublicKey key)` Configure the router's signing public key
`void` `startup()`
`LeaseSetKeys` `unregisterKeys(Destination dest)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROP_KEYDIR

    public static final java.lang.String PROP_KEYDIR

See Also:
  Constant Field Values

### DEFAULT_KEYDIR

    public static final java.lang.String DEFAULT_KEYDIR

See Also:
  Constant Field Values

Constructor Detail

### KeyManager

    public KeyManager(RouterContext context)

Method Detail

### startup

    public void startup()

### setPrivateKey

    public void setPrivateKey(PrivateKey key)

  Configure the router's private key

### getPrivateKey

    public PrivateKey getPrivateKey()

### setPublicKey

    public void setPublicKey(PublicKey key)

  Configure the router's public key

### getPublicKey

    public PublicKey getPublicKey()

### setSigningPrivateKey

    public void setSigningPrivateKey(SigningPrivateKey key)

  Configure the router's signing private key

### getSigningPrivateKey

    public SigningPrivateKey getSigningPrivateKey()

### setSigningPublicKey

    public void setSigningPublicKey(SigningPublicKey key)

  Configure the router's signing public key

### getSigningPublicKey

    public SigningPublicKey getSigningPublicKey()

### registerKeys

    public void registerKeys(Destination dest,
                             SigningPrivateKey leaseRevocationPrivateKey,
                             PrivateKey endpointDecryptionKey)

### unregisterKeys

    public LeaseSetKeys unregisterKeys(Destination dest)

### getKeys

    public LeaseSetKeys getKeys(Destination dest)

### getKeys

    public LeaseSetKeys getKeys(Hash dest)

### getAllKeys

    public java.util.Set getAllKeys()