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
final class ReflectedLongCrc extends AbstractLongCrc
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
Constructors Constructor Description ReflectedLongCrc(java.lang.String algorithm, int width, long poly, long init, long xorOut)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longinitial()The initial state of the hash function, which is the same as the output value for an empty input sequence.protected longresumeRaw(long crc, byte[] input, int index, int length)-
Methods inherited from class com.scurrilous.circe.crc.AbstractLongCrc
algorithm, length, reflect, resumeUnchecked
-
Methods inherited from class com.scurrilous.circe.impl.AbstractIncrementalLongHash
calculate, calculate, calculate, calculate, createStateful, resume, resume, resume, resume, supportsUnsafe
-
-
-
-
Method Detail
-
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
-
-