Class KeyManager

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

public class KeyManager extends Object
Maintain all of the key pairs for the router. Router keys are written to files in a backup directory. LeaseSet keys are not written to files.
  • Field Details

  • Constructor Details

  • Method Details

    • startup

      @Deprecated public void startup()
      Deprecated.
      we never read keys in anymore
      Read keys in from disk, blocking
    • setKeys

      public void setKeys(PublicKey key1, PrivateKey key2, SigningPublicKey key3, SigningPrivateKey key4)
      Configure the router's keys.
      Since:
      0.9.4 replace individual setters
    • getPrivateKey

      public PrivateKey getPrivateKey()
      Router key
      Returns:
      will be null on error or before startup() or setKeys() is called
    • getPublicKey

      public PublicKey getPublicKey()
      Router key
      Returns:
      will be null on error or before startup() or setKeys() is called
    • getSigningPrivateKey

      public SigningPrivateKey getSigningPrivateKey()
      Router key
      Returns:
      will be null on error or before startup() or setKeys() is called
    • getSigningPublicKey

      public SigningPublicKey getSigningPublicKey()
      Router key
      Returns:
      will be null on error or before startup() or setKeys() is called
    • registerKeys

      public void registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, PrivateKey endpointDecryptionKey)
      Client with a single key
      Parameters:
      leaseRevocationPrivateKey - unused, may be null
    • registerKeys

      public void registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, List<PrivateKey> endpointDecryptionKeys)
      Client with multiple keys
      Parameters:
      leaseRevocationPrivateKey - unused, may be null
      Since:
      0.9.44
    • unregisterKeys

      public LeaseSetKeys unregisterKeys(Destination dest)
      client
    • getKeys

      public LeaseSetKeys getKeys(Destination dest)
      client
    • getKeys

      public LeaseSetKeys getKeys(Hash dest)
      client