Package com.scurrilous.circe.crc
Class ReflectedLongCrc
java.lang.Object
com.scurrilous.circe.impl.AbstractIncrementalLongHash
com.scurrilous.circe.crc.AbstractLongCrc
com.scurrilous.circe.crc.ReflectedLongCrc
- All Implemented Interfaces:
Hash,IncrementalLongHash,StatelessHash,StatelessLongHash
Implements a "reflected" LSB-first long-width CRC function using a lookup
table.
-
Field Summary
Fields inherited from class com.scurrilous.circe.crc.AbstractLongCrc
bitWidth -
Constructor Summary
ConstructorsConstructorDescriptionReflectedLongCrc(String algorithm, int width, long poly, long init, long xorOut) -
Method Summary
Methods inherited from class com.scurrilous.circe.crc.AbstractLongCrc
algorithm, length, reflect, resumeUncheckedMethods inherited from class com.scurrilous.circe.impl.AbstractIncrementalLongHash
calculate, calculate, calculate, calculate, createStateful, resume, resume, resume, resume, supportsUnsafe
-
Constructor Details
-
ReflectedLongCrc
ReflectedLongCrc(String algorithm, int width, long poly, long init, long xorOut)
-
-
Method Details
-
initial
protected long initial()Description copied from class:AbstractIncrementalLongHashThe initial state of the hash function, which is the same as the output value for an empty input sequence.- Overrides:
initialin classAbstractLongCrc- Returns:
- the initial hash state/output
-
resumeRaw
protected long resumeRaw(long crc, byte[] input, int index, int length) - Specified by:
resumeRawin classAbstractLongCrc
-