Package net.i2p.data
Class RoutingKeyGenerator
java.lang.Object
net.i2p.data.RoutingKeyGenerator
- Direct Known Subclasses:
RouterKeyGenerator
Component to manage the munging of hashes into routing keys - given a hash,
perform some consistent transformation against it and return the result.
This transformation is fed by the current "mod data".
As of 0.9.16, this is essentially just an interface.
Implementation moved to net.i2p.data.router.RouterKeyGenerator.
No generator is available in I2PAppContext; you must be in RouterContext.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RoutingKeyGenerator
Get the generator for this context.abstract long
The version of the current (today's) mod data.abstract Hash
getRoutingKey
(Hash origKey) Get the routing key for a key.
-
Constructor Details
-
RoutingKeyGenerator
public RoutingKeyGenerator()
-
-
Method Details
-
getInstance
Get the generator for this context.- Returns:
- null in I2PAppContext; non-null in RouterContext.
-
getLastChanged
public abstract long getLastChanged()The version of the current (today's) mod data. Use to determine if the routing key should be regenerated. -
getRoutingKey
Get the routing key for a key.- Throws:
IllegalArgumentException
- if origKey is null
-