Package net.i2p.router.startup
Class CreateRouterInfoJob
java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.startup.CreateRouterInfoJob
- All Implemented Interfaces:
Job
Warning - misnamed. This creates a new RouterIdentity, i.e.
new router keys and hash. It then builds a new RouterInfo
and saves all the keys. This is generally run only once, on a new install.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) RouterInfoWrites 6 files: router.info (standard RI format), router.keys.dat, and 4 individual key files under keyBackup/ router.keys.dat file format: This is the same "eepPriv.dat" format used by the client code, as documented in PrivateKeyFile.(package private) static longgetCurrentPublishDate(RouterContext context) We probably don't want to expose the exact time at which a router published its info.static EncTypeThe configured EncType to expect on read-ingetName()Descriptive name of the taskstatic SigTypeThe configured SigType to expect on read-invoidrunJob()Actually perform the task.Methods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, madeReady, requeue, toString
-
Field Details
-
INFO_FILENAME
- See Also:
-
KEYS_FILENAME
- See Also:
-
KEYS2_FILENAME
- See Also:
-
PROP_ROUTER_SIGTYPE
- See Also:
-
PROP_ROUTER_ENCTYPE
- Since:
- 0.9.48
- See Also:
-
-
Constructor Details
-
CreateRouterInfoJob
CreateRouterInfoJob(RouterContext ctx, Job next)
-
-
Method Details
-
getName
Description copied from interface:JobDescriptive name of the task -
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete. -
createRouterInfo
RouterInfo createRouterInfo()Writes 6 files: router.info (standard RI format), router.keys.dat, and 4 individual key files under keyBackup/ router.keys.dat file format: This is the same "eepPriv.dat" format used by the client code, as documented in PrivateKeyFile. Old router.keys file format: Note that this is NOT the same "eepPriv.dat" format used by the client code.- Private key (256 bytes) - Signing Private key (20 bytes) - Public key (256 bytes) - Signing Public key (128 bytes) Total 660 bytes
Caller must hold Router.routerInfoFileLock. -
getSigTypeConfig
The configured SigType to expect on read-in- Since:
- 0.9.16
-
getEncTypeConfig
The configured EncType to expect on read-in- Since:
- 0.9.48
-
getCurrentPublishDate
We probably don't want to expose the exact time at which a router published its info. perhaps round down to the nearest minute? 10 minutes? 30 minutes? day?
-