Package com.scurrilous.circe.crc
Class ReflectedIntCrc
- java.lang.Object
-
- com.scurrilous.circe.impl.AbstractIncrementalIntHash
-
- com.scurrilous.circe.crc.AbstractIntCrc
-
- com.scurrilous.circe.crc.ReflectedIntCrc
-
- All Implemented Interfaces:
Hash
,IncrementalIntHash
,StatelessHash
,StatelessIntHash
final class ReflectedIntCrc extends AbstractIntCrc
Implements a "reflected" LSB-first int-width CRC function using a lookup table.
-
-
Field Summary
-
Fields inherited from class com.scurrilous.circe.crc.AbstractIntCrc
bitWidth
-
-
Constructor Summary
Constructors Constructor Description ReflectedIntCrc(java.lang.String algorithm, int width, int poly, int init, int xorOut)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
initial()
The initial state of the hash function, which is the same as the output value for an empty input sequence.protected int
resumeRaw(int crc, byte[] input, int index, int length)
-
Methods inherited from class com.scurrilous.circe.crc.AbstractIntCrc
algorithm, length, reflect, resumeUnchecked
-
Methods inherited from class com.scurrilous.circe.impl.AbstractIncrementalIntHash
calculate, calculate, calculate, calculate, createStateful, resume, resume, resume, resume, supportsUnsafe
-
-
-
-
Method Detail
-
initial
protected int initial()
Description copied from class:AbstractIncrementalIntHash
The initial state of the hash function, which is the same as the output value for an empty input sequence.- Overrides:
initial
in classAbstractIntCrc
- Returns:
- the initial hash state/output
-
resumeRaw
protected int resumeRaw(int crc, byte[] input, int index, int length)
- Specified by:
resumeRaw
in classAbstractIntCrc
-
-