Package com.scurrilous.circe
Interface IncrementalIntHash
- 
- All Superinterfaces:
- Hash,- StatelessHash,- StatelessIntHash
 - All Known Implementing Classes:
- AbstractIncrementalIntHash,- AbstractIntCrc,- NormalByteCrc,- NormalIntCrc,- ReflectedIntCrc,- Sse42Crc32C
 
 public interface IncrementalIntHash extends StatelessIntHash Incremental stateless integer hash function, which has the property that its output is the same as (or easily derivable from) its state. Specifically, for any sequence M partitioned arbitrarily into two subsequences M1 M2:h(M) = h'(h(M1), M2) where h corresponds to thecalculatefunction and h' corresponds to theresume(int, byte[])function.Note that stateful hash functions obtained from incremental stateless hash functions are also incremental. 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description intresume(int current, byte[] input)Evaluates this hash function as if the entire given input array were appended to the previously hashed input.intresume(int current, byte[] input, int index, int length)Evaluates this hash function as if the given range of the given input array were appended to the previously hashed input.intresume(int current, long address, long length)Evaluates this hash function as if the memory with the given address and length were appended to the previously hashed input.intresume(int current, java.nio.ByteBuffer input)Evaluates this hash function as if the remaining contents of the given input buffer were appended to the previously hashed input.- 
Methods inherited from interface com.scurrilous.circe.Hashalgorithm, length, supportsUnsafe
 - 
Methods inherited from interface com.scurrilous.circe.StatelessIntHashcalculate, calculate, calculate, calculate, createStateful
 
- 
 
- 
- 
- 
Method Detail- 
resumeint resume(int current, byte[] input)Evaluates this hash function as if the entire given input array were appended to the previously hashed input.- Parameters:
- current- the hash output for input hashed so far
- input- the input array
- Returns:
- the output of the hash function for the concatenated input
 
 - 
resumeint resume(int current, byte[] input, int index, int length)Evaluates this hash function as if the given range of the given input array were appended to the previously hashed input.- Parameters:
- current- the hash output for input hashed so far
- input- the input array
- index- the starting index of the first input byte
- length- the length of the input range
- Returns:
- the output of the hash function for the concatenated input
- Throws:
- java.lang.IndexOutOfBoundsException- if index is negative or- index + lengthis greater than the array length
 
 - 
resumeint resume(int current, java.nio.ByteBuffer input)Evaluates this hash function as if the remaining contents of the given input buffer were appended to the previously hashed input. This method leaves the buffer position at the limit.- Parameters:
- current- the hash output for input hashed so far
- input- the input buffer
- Returns:
- the output of the hash function for the concatenated input
 
 - 
resumeint resume(int current, long address, long length)Evaluates this hash function as if the memory with the given address and length were appended to the previously hashed input. The arguments are generally not checked in any way and will likely lead to a VM crash or undefined results if invalid.- Parameters:
- current- the hash output for input hashed so far
- address- the base address of the input
- length- the length of the input
- Returns:
- the output of the hash function for the concatenated input
- Throws:
- java.lang.UnsupportedOperationException- if this function does not support unsafe memory access
- See Also:
- Hash.supportsUnsafe()
 
 
- 
 
-