|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | Calculate (const void *data, crcpp_size size, const Parameters< CRCType, CRCWidth > ¶meters) |
| Computes a CRC.
|
|
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.
|
|
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.
|
|
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.
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | CalculateBits (const void *data, crcpp_size size, const Parameters< CRCType, CRCWidth > ¶meters) |
| Computes a CRC.
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | CalculateBits (const void *data, crcpp_size size, const Parameters< CRCType, CRCWidth > ¶meters, CRCType crc) |
| Appends additional data to a previous CRC calculation.
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | CalculateBits (const void *data, crcpp_size size, const Table< CRCType, CRCWidth > &lookupTable) |
| Computes a CRC via a lookup table.
|
|
template<typename CRCType , crcpp_uint16 CRCWidth> |
static CRCType | CalculateBits (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.
|
|
static const Parameters< crcpp_uint8, 4 > & | CRC_4_ITU () |
| Returns a set of parameters for CRC-4 ITU.
|
|
static const Parameters< crcpp_uint8, 5 > & | CRC_5_EPC () |
| Returns a set of parameters for CRC-5 EPC.
|
|
static const Parameters< crcpp_uint8, 5 > & | CRC_5_ITU () |
| Returns a set of parameters for CRC-5 ITU.
|
|
static const Parameters< crcpp_uint8, 5 > & | CRC_5_USB () |
| Returns a set of parameters for CRC-5 USB.
|
|
static const Parameters< crcpp_uint8, 6 > & | CRC_6_CDMA2000A () |
| Returns a set of parameters for CRC-6 CDMA2000-A.
|
|
static const Parameters< crcpp_uint8, 6 > & | CRC_6_CDMA2000B () |
| Returns a set of parameters for CRC-6 CDMA2000-B.
|
|
static const Parameters< crcpp_uint8, 6 > & | CRC_6_ITU () |
| Returns a set of parameters for CRC-6 ITU.
|
|
static const Parameters< crcpp_uint8, 6 > & | CRC_6_NR () |
| Returns a set of parameters for CRC-6 NR.
|
|
static const Parameters< crcpp_uint8, 7 > & | CRC_7 () |
| Returns a set of parameters for CRC-7 JEDEC.
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8 () |
| Returns a set of parameters for CRC-8 SMBus.
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8_EBU () |
| Returns a set of parameters for CRC-8 EBU (aka CRC-8 AES).
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8_HDLC () |
| Returns a set of parameters for CRC-8 HDLC (ISO/IEC 13239:2002).
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8_MAXIM () |
| Returns a set of parameters for CRC-8 MAXIM (aka CRC-8 DOW-CRC).
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8_WCDMA () |
| Returns a set of parameters for CRC-8 WCDMA.
|
|
static const Parameters< crcpp_uint8, 8 > & | CRC_8_LTE () |
| Returns a set of parameters for CRC-8 LTE.
|
|
static const Parameters< crcpp_uint16, 10 > & | CRC_10 () |
| Returns a set of parameters for CRC-10 ITU.
|
|
static const Parameters< crcpp_uint16, 10 > & | CRC_10_CDMA2000 () |
| Returns a set of parameters for CRC-10 CDMA2000.
|
|
static const Parameters< crcpp_uint16, 11 > & | CRC_11 () |
| Returns a set of parameters for CRC-11 FlexRay.
|
|
static const Parameters< crcpp_uint16, 11 > & | CRC_11_NR () |
| Returns a set of parameters for CRC-11 NR.
|
|
static const Parameters< crcpp_uint16, 12 > & | CRC_12_CDMA2000 () |
| Returns a set of parameters for CRC-12 CDMA2000.
|
|
static const Parameters< crcpp_uint16, 12 > & | CRC_12_DECT () |
| Returns a set of parameters for CRC-12 DECT (aka CRC-12 X-CRC).
|
|
static const Parameters< crcpp_uint16, 12 > & | CRC_12_UMTS () |
| Returns a set of parameters for CRC-12 UMTS (aka CRC-12 3GPP).
|
|
static const Parameters< crcpp_uint16, 13 > & | CRC_13_BBC () |
| Returns a set of parameters for CRC-13 BBC.
|
|
static const Parameters< crcpp_uint16, 15 > & | CRC_15 () |
| Returns a set of parameters for CRC-15 CAN.
|
|
static const Parameters< crcpp_uint16, 15 > & | CRC_15_MPT1327 () |
| Returns a set of parameters for CRC-15 MPT1327.
|
|
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).
|
|
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).
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_CCITTFALSE () |
| Returns a set of parameters for CRC-16 CCITT FALSE.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_MCRF4XX () |
| Returns a set of parameters for CRC-16 MCRF4XX.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_CDMA2000 () |
| Returns a set of parameters for CRC-16 CDMA2000.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_CMS () |
| Returns a set of parameters for CRC-16 CMS.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_DECTR () |
| Returns a set of parameters for CRC-16 DECT-R (aka CRC-16 R-CRC).
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_DECTX () |
| Returns a set of parameters for CRC-16 DECT-X (aka CRC-16 X-CRC).
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_DNP () |
| Returns a set of parameters for CRC-16 DNP.
|
|
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).
|
|
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).
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_MAXIM () |
| Returns a set of parameters for CRC-16 MAXIM.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_MODBUS () |
| Returns a set of parameters for CRC-16 MODBUS.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_T10DIF () |
| Returns a set of parameters for CRC-16 T10-DIF.
|
|
static const Parameters< crcpp_uint16, 16 > & | CRC_16_USB () |
| Returns a set of parameters for CRC-16 USB.
|
|
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).
|
|
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).
|
|
static const Parameters< crcpp_uint32, 17 > & | CRC_17_CAN () |
| Returns a set of parameters for CRC-17 CAN.
|
|
static const Parameters< crcpp_uint32, 21 > & | CRC_21_CAN () |
| Returns a set of parameters for CRC-21 CAN.
|
|
static const Parameters< crcpp_uint32, 24 > & | CRC_24 () |
| Returns a set of parameters for CRC-24 OPENPGP.
|
|
static const Parameters< crcpp_uint32, 24 > & | CRC_24_FLEXRAYA () |
| Returns a set of parameters for CRC-24 FlexRay-A.
|
|
static const Parameters< crcpp_uint32, 24 > & | CRC_24_FLEXRAYB () |
| Returns a set of parameters for CRC-24 FlexRay-B.
|
|
static const Parameters< crcpp_uint32, 24 > & | CRC_24_LTEA () |
| Returns a set of parameters for CRC-24 LTE-A/NR-A.
|
|
static const Parameters< crcpp_uint32, 24 > & | CRC_24_LTEB () |
| Returns a set of parameters for CRC-24 LTE-B/NR-B.
|
|
static const Parameters< crcpp_uint32, 24 > & | CRC_24_NRC () |
| Returns a set of parameters for CRC-24 NR-C.
|
|
static const Parameters< crcpp_uint32, 30 > & | CRC_30 () |
| Returns a set of parameters for CRC-30 CDMA.
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32 () |
| Returns a set of parameters for CRC-32 (aka CRC-32 ADCCP, CRC-32 PKZip).
|
|
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).
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_C () |
| Returns a set of parameters for CRC-32 C (aka CRC-32 ISCSI, CRC-32 Castagnoli, CRC-32 Interlaken).
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_MPEG2 () |
| Returns a set of parameters for CRC-32 MPEG-2.
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_POSIX () |
| Returns a set of parameters for CRC-32 POSIX.
|
|
static const Parameters< crcpp_uint32, 32 > & | CRC_32_Q () |
| Returns a set of parameters for CRC-32 Q.
|
|
static const Parameters< crcpp_uint64, 40 > & | CRC_40_GSM () |
| Returns a set of parameters for CRC-40 GSM.
|
|
static const Parameters< crcpp_uint64, 64 > & | CRC_64 () |
| Returns a set of parameters for CRC-64 ECMA.
|
|
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.