class LocalHash extends Hash
FAKE_HASH, HASH_LENGTH_data| Constructor and Description |
|---|
LocalHash(byte[] b)LocalHash. |
LocalHash(Hash h)LocalHash. |
| 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()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, toBase64calculateHash, equals, fromBase64, fromByteArray, getData, read, toByteArray, toString, writeBytespublic LocalHash(byte[] b)
public LocalHash(Hash h)
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()
public void prepareCache()