net.i2p.data
public class RoutingKeyGenerator extends Object
Constructor and Description |
---|
RoutingKeyGenerator(I2PAppContext context) |
Modifier and Type | Method and Description |
---|---|
void |
generateDateBasedModData()
Update the current modifier data with some bytes derived from the current
date (yyyyMMdd in GMT)
|
static RoutingKeyGenerator |
getInstance() |
long |
getLastChanged() |
byte[] |
getModData() |
Hash |
getRoutingKey(Hash origKey)
Generate a modified (yet consistent) hash from the origKey by generating the
SHA256 of the targetKey with the current modData appended to it, *then*
This makes Sybil's job a lot harder, as she needs to essentially take over the
whole keyspace.
|
static void |
main(String[] args) |
void |
setModData(byte[] modData) |
public RoutingKeyGenerator(I2PAppContext context)
public static RoutingKeyGenerator getInstance()
public byte[] getModData()
public long getLastChanged()
public void setModData(byte[] modData)
public void generateDateBasedModData()
public Hash getRoutingKey(Hash origKey)
IllegalArgumentException
- if origKey is nullpublic static void main(String[] args)