Serializable
, DataStructure
class LocalHash extends Hash
FAKE_HASH, HASH_LENGTH
_data
Modifier and Type | Method | Description |
---|---|---|
byte[] |
cachedXor(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.
|
read
clearCache, create, create, create, hashCode, length, readBytes, setData, toBase32, toBase64
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
calculateHash, equals, fromBase64, fromByteArray, getData, toByteArray, toString, writeBytes
public LocalHash(Hash h)
public LocalHash(byte[] b)
public void prepareCache()
public byte[] cachedXor(Hash key) throws IllegalStateException
IllegalStateException
- if you try to use the cache without first
preparing this object's cache via .prepareCache()public void clearXorCache()