class BlindCache extends Object
| Constructor and Description |
|---|
BlindCache(RouterContext ctx)
Caller MUST call startup() to load persistent cache from disk
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToCache(net.i2p.data.BlindData bd)
Persists immediately if secret or privkey is non-null
|
net.i2p.data.Hash |
getBlindedHash(net.i2p.data.Destination dest)
The hash to lookup for a dest.
|
net.i2p.data.Hash |
getBlindedHash(net.i2p.data.SigningPublicKey spk)
The hash to lookup for a SPK known to be blinded.
|
List<net.i2p.data.BlindData> |
getData()
For console ConfigKeyringHelper
|
net.i2p.data.BlindData |
getData(net.i2p.data.Destination dest)
The cached data or null
|
net.i2p.data.BlindData |
getData(net.i2p.data.SigningPublicKey spk)
The cached data or null
|
net.i2p.data.Hash |
getHash(net.i2p.data.Destination dest)
The hash to lookup for a dest.
|
net.i2p.data.Hash |
getHash(net.i2p.data.Hash h)
The hash to lookup for a dest hash.
|
net.i2p.data.BlindData |
getReverseData(net.i2p.data.SigningPublicKey spk)
The cached data or null
|
boolean |
removeBlindData(net.i2p.data.SigningPublicKey spk)
For console ConfigKeyringHelper.
|
void |
rollover()
Refresh all the data at midnight
|
void |
setBlinded(net.i2p.data.Destination dest)
Add the destination to the cache entry.
|
void |
setBlinded(net.i2p.data.Destination dest,
net.i2p.crypto.SigType blindedType,
String secret)
Mark a destination as known to be blinded
|
void |
shutdown()
May be restarted by calling startup() again.
|
void |
startup() |
public BlindCache(RouterContext ctx)
public void shutdown()
public void startup()
public net.i2p.data.Hash getHash(net.i2p.data.Destination dest)
dest - may or may not be blindedpublic net.i2p.data.Hash getHash(net.i2p.data.Hash h)
h - may or may not be blindedpublic net.i2p.data.Hash getBlindedHash(net.i2p.data.Destination dest)
dest - may or may not be blindedpublic net.i2p.data.Hash getBlindedHash(net.i2p.data.SigningPublicKey spk)
spk - known to be blindedIllegalArgumentException - on various errorspublic void setBlinded(net.i2p.data.Destination dest,
net.i2p.crypto.SigType blindedType,
String secret)
dest - known to be blindedblindedType - null for defaultsecret - may be nullIllegalArgumentException - on various errorspublic void setBlinded(net.i2p.data.Destination dest)
dest - known to be blindedIllegalArgumentException - on various errorspublic void addToCache(net.i2p.data.BlindData bd)
public net.i2p.data.BlindData getData(net.i2p.data.Destination dest)
public net.i2p.data.BlindData getData(net.i2p.data.SigningPublicKey spk)
spk - the unblinded public keypublic net.i2p.data.BlindData getReverseData(net.i2p.data.SigningPublicKey spk)
spk - the blinded public keypublic void rollover()
public List<net.i2p.data.BlindData> getData()
public boolean removeBlindData(net.i2p.data.SigningPublicKey spk)
spk - the unblinded public key