Calculates CRC32 checksums. More...
Public Member Functions | |
long | compute (byte[] bytes) |
Computes the 32-bit CRC for an array of bytes. More... | |
long | compute (byte[] bytes, int offset) |
Computes the 32-bit CRC for an array of bytes. More... | |
long | compute (byte[] bytes, int offset, int length) |
Computes the 32-bit CRC for an array of bytes. More... | |
String | computeHex (byte[] bytes) |
Computes the 32-bit CRC hex string for an array of bytes. More... | |
String | computeHex (byte[] bytes, int offset) |
Computes the 32-bit CRC hex string for an array of bytes. More... | |
String | computeHex (byte[] bytes, int offset, int length) |
Computes the 32-bit CRC hex string for an array of bytes. More... | |
Crc32 () | |
Initializes a new instance of the fm.liveswitch.Crc32 class using the CRC32 polynomial. More... | |
Crc32 (long polynomial) | |
Initializes a new instance of the fm.liveswitch.Crc32 class using the specified polynomial. More... | |
Crc32 (long polynomial, boolean reverseBits) | |
Initializes a new instance of the fm.liveswitch.Crc32 class using the specified polynomial. More... | |
long | getFinalXorValue () |
Gets the value used to XOR the final result. More... | |
long | getInitialValue () |
Gets the initial value. More... | |
long | getPolynomial () |
Gets the polynomial. More... | |
boolean | getReverseBits () |
Gets a value indicating whether to reverse the bits. More... | |
void | setFinalXorValue (long value) |
Sets the value used to XOR the final result. More... | |
void | setInitialValue (long value) |
Sets the initial value. More... | |
Static Public Member Functions | |
static long | getCrc32cPolynomial () |
Gets the CRC32c polynomial. More... | |
static long | getCrc32dPolynomial () |
Gets the CRC32d polynomial. More... | |
static long | getCrc32Polynomial () |
Gets the CRC32 polynomial. More... | |
Calculates CRC32 checksums.
fm.liveswitch.Crc32.Crc32 | ( | ) |
Initializes a new instance of the fm.liveswitch.Crc32 class using the CRC32 polynomial.
fm.liveswitch.Crc32.Crc32 | ( | long | polynomial | ) |
Initializes a new instance of the fm.liveswitch.Crc32 class using the specified polynomial.
polynomial | The polynomial. |
fm.liveswitch.Crc32.Crc32 | ( | long | polynomial, |
boolean | reverseBits | ||
) |
Initializes a new instance of the fm.liveswitch.Crc32 class using the specified polynomial.
polynomial | The polynomial. |
reverseBits | Whether to reverse the bits. |
long fm.liveswitch.Crc32.compute | ( | byte[] | bytes | ) |
Computes the 32-bit CRC for an array of bytes.
bytes | The bytes. |
long fm.liveswitch.Crc32.compute | ( | byte[] | bytes, |
int | offset | ||
) |
Computes the 32-bit CRC for an array of bytes.
bytes | The bytes. |
offset | The offset. |
long fm.liveswitch.Crc32.compute | ( | byte[] | bytes, |
int | offset, | ||
int | length | ||
) |
Computes the 32-bit CRC for an array of bytes.
bytes | The bytes. |
offset | The offset. |
length | The length. |
String fm.liveswitch.Crc32.computeHex | ( | byte[] | bytes | ) |
Computes the 32-bit CRC hex string for an array of bytes.
bytes | The bytes. |
String fm.liveswitch.Crc32.computeHex | ( | byte[] | bytes, |
int | offset | ||
) |
Computes the 32-bit CRC hex string for an array of bytes.
bytes | The bytes. |
offset | The offset. |
String fm.liveswitch.Crc32.computeHex | ( | byte[] | bytes, |
int | offset, | ||
int | length | ||
) |
Computes the 32-bit CRC hex string for an array of bytes.
bytes | The bytes. |
offset | The offset. |
length | The length. |
|
static |
Gets the CRC32c polynomial.
|
static |
Gets the CRC32d polynomial.
|
static |
Gets the CRC32 polynomial.
long fm.liveswitch.Crc32.getFinalXorValue | ( | ) |
Gets the value used to XOR the final result.
long fm.liveswitch.Crc32.getInitialValue | ( | ) |
Gets the initial value.
long fm.liveswitch.Crc32.getPolynomial | ( | ) |
Gets the polynomial.
boolean fm.liveswitch.Crc32.getReverseBits | ( | ) |
Gets a value indicating whether to reverse the bits.
void fm.liveswitch.Crc32.setFinalXorValue | ( | long | value | ) |
Sets the value used to XOR the final result.
void fm.liveswitch.Crc32.setInitialValue | ( | long | value | ) |
Sets the initial value.