class LocalHash
extends net.i2p.data.Hash
| Constructor and Description |
|---|
LocalHash(byte[] b) |
LocalHash(net.i2p.data.Hash h) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
cachedXor(net.i2p.data.Hash key)
Calculate the xor with the current object and the specified hash,
caching values where possible.
|
void |
clearXorCache() |
void |
prepareCache()
Prepare this hash's cache for xor values - very few hashes will need it,
so we don't want to waste the memory, and lazy initialization would incur
online overhead to verify the initialization.
|
clearCache, create, create, create, hashCode, length, readBytes, setData, toBase32, toBase64public LocalHash(net.i2p.data.Hash h)
public LocalHash(byte[] b)
public void prepareCache()
public byte[] cachedXor(net.i2p.data.Hash key)
throws IllegalStateException
IllegalStateException - if you try to use the cache without first
preparing this object's cache via .prepareCache()public void clearXorCache()