class LocalHash extends Hash
FAKE_HASH, HASH_LENGTH
_data
Modifier and Type | Method and 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.
|
clearCache, create, create, create, hashCode, length, readBytes, setData, toBase32, toBase64
calculateHash, equals, fromBase64, fromByteArray, getData, toByteArray, toString, writeBytes
read
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()