|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | Calculate (const void *data, crcpp_size size, const Parameters< CRCType, CRCWidth > ¶meters) |
| Computes a CRC. More...
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | Calculate (const void *data, crcpp_size size, const Parameters< CRCType, CRCWidth > ¶meters, CRCType crc) |
| Appends additional data to a previous CRC calculation. More...
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | Calculate (const void *data, crcpp_size size, const Table< CRCType, CRCWidth > &lookupTable) |
| Computes a CRC via a lookup table. More...
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | Calculate (const void *data, crcpp_size size, const Table< CRCType, CRCWidth > &lookupTable, CRCType crc) |
| Appends additional data to a previous CRC calculation using a lookup table. More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_ARC () |
| Returns a set of parameters for CRC-16 ARC (aka CRC-16 IBM, CRC-16 LHA). More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_BUYPASS () |
| Returns a set of parameters for CRC-16 BUYPASS (aka CRC-16 VERIFONE, CRC-16 UMTS). More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_CCITTFALSE () |
| Returns a set of parameters for CRC-16 CCITT FALSE. More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_GENIBUS () |
| Returns a set of parameters for CRC-16 GENIBUS (aka CRC-16 EPC, CRC-16 I-CODE, CRC-16 DARC). More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_KERMIT () |
| Returns a set of parameters for CRC-16 KERMIT (aka CRC-16 CCITT, CRC-16 CCITT-TRUE). More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_X25 () |
| Returns a set of parameters for CRC-16 X-25 (aka CRC-16 IBM-SDLC, CRC-16 ISO-HDLC, CRC-16 B). More...
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_XMODEM () |
| Returns a set of parameters for CRC-16 XMODEM (aka CRC-16 ZMODEM, CRC-16 ACORN, CRC-16 LTE). More...
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32 () |
| Returns a set of parameters for CRC-32 (aka CRC-32 ADCCP, CRC-32 PKZip). More...
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_BZIP2 () |
| Returns a set of parameters for CRC-32 BZIP2 (aka CRC-32 AAL5, CRC-32 DECT-B, CRC-32 B-CRC). More...
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_MPEG2 () |
| Returns a set of parameters for CRC-32 MPEG-2. More...
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_POSIX () |
| Returns a set of parameters for CRC-32 POSIX. More...
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8 () |
| Returns a set of parameters for CRC-8 SMBus. More...
|
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | CalculateRemainder (const void *data, crcpp_size size, const Parameters< CRCType, CRCWidth > ¶meters, CRCType remainder) |
| Computes a CRC remainder. More...
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | CalculateRemainder (const void *data, crcpp_size size, const Table< CRCType, CRCWidth > &lookupTable, CRCType remainder) |
| Computes a CRC remainder using lookup table. More...
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | Finalize (CRCType remainder, CRCType finalXOR, bool reflectOutput) |
| Computes the final reflection and XOR of a CRC remainder. More...
|
|
template<typename IntegerType > |
static IntegerType | Reflect (IntegerType value, crcpp_uint16 numBits) |
| Reflects (i.e. reverses the bits within) an integer value. More...
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | UndoFinalize (CRCType remainder, CRCType finalXOR, bool reflectOutput) |
| Undoes the process of computing the final reflection and XOR of a CRC remainder. More...
|
|
Static class for computing CRCs.
- Note
- This class supports computation of full and multi-part CRCs, using a bit-by-bit algorithm or a byte-by-byte lookup table. The CRCs are calculated using as many optimizations as is reasonable. If compiling with C++11, the constexpr keyword is used liberally so that many calculations are performed at compile-time instead of at runtime.
Definition at line 142 of file crc.h.