CRC - Man Page
Static class for computing CRCs.
Synopsis
#include <CRC.h>
Classes
struct Table
CRC lookup table. After construction, the CRC parameters are fixed.
struct Parameters
CRC parameters.
Public Member Functions
CRC ()=delete
CRC (const CRC &other)=delete
CRC & operator= (const CRC &other)=delete
CRC (CRC &&other)=delete
CRC & operator= (CRC &&other)=delete
Static Public Member Functions
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 Private Member Functions
template<typename IntegerType> static IntegerType Reflect (IntegerType value, crcpp_uint16 numBits)
Reflects (i.e. reverses the bits within) an integer value.
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.
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.
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.
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.
template<typename CRCType, crcpp_uint16 CRCWidth> static CRCType CalculateRemainderBits (unsigned char byte, crcpp_size numBits, const Parameters< CRCType, CRCWidth > ¶meters, CRCType remainder)
Detailed Description
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.
Constructor & Destructor Documentation
CRC::CRC () [delete]
CRC::CRC (const CRC & other) [delete]
CRC::CRC (CRC && other) [delete]
Member Function Documentation
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Calculate (const void * data, crcpp_size size, const Parameters< CRCType, CRCWidth > & parameters) [inline], [static]
Computes a CRC.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bytes
parameters CRC parameters- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Calculate (const void * data, crcpp_size size, const Parameters< CRCType, CRCWidth > & parameters, CRCType crc) [inline], [static]
Appends additional data to a previous CRC calculation.
- Note
This function can be used to compute multi-part CRCs.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bytes
parameters CRC parameters
crc CRC from a previous calculation- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Calculate (const void * data, crcpp_size size, const Table< CRCType, CRCWidth > & lookupTable) [inline], [static]
Computes a CRC via a lookup table.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bytes
lookupTable CRC lookup table- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Calculate (const void * data, crcpp_size size, const Table< CRCType, CRCWidth > & lookupTable, CRCType crc) [inline], [static]
Appends additional data to a previous CRC calculation using a lookup table.
- Note
This function can be used to compute multi-part CRCs.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bytes
lookupTable CRC lookup table
crc CRC from a previous calculation- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateBits (const void * data, crcpp_size size, const Parameters< CRCType, CRCWidth > & parameters) [inline], [static]
Computes a CRC.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bits
parameters CRC parameters- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateBits (const void * data, crcpp_size size, const Parameters< CRCType, CRCWidth > & parameters, CRCType crc) [inline], [static]
Appends additional data to a previous CRC calculation.
- Note
This function can be used to compute multi-part CRCs.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bits
parameters CRC parameters
crc CRC from a previous calculation- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateBits (const void * data, crcpp_size size, const Table< CRCType, CRCWidth > & lookupTable) [inline], [static]
Computes a CRC via a lookup table.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bits
lookupTable CRC lookup table- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateBits (const void * data, crcpp_size size, const Table< CRCType, CRCWidth > & lookupTable, CRCType crc) [inline], [static]
Appends additional data to a previous CRC calculation using a lookup table.
- Note
This function can be used to compute multi-part CRCs.
- Parameters
data Data over which CRC will be computed
size Size of the data, in bits
lookupTable CRC lookup table
crc CRC from a previous calculation- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateRemainder (const void * data, crcpp_size size, const Parameters< CRCType, CRCWidth > & parameters, CRCType remainder) [inline], [static], [private]
Computes a CRC remainder.
- Parameters
data Data over which the remainder will be computed
size Size of the data, in bytes
parameters CRC parameters
remainder Running CRC remainder. Can be an initial value or the result of a previous CRC remainder calculation.- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC remainder
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateRemainder (const void * data, crcpp_size size, const Table< CRCType, CRCWidth > & lookupTable, CRCType remainder) [inline], [static], [private]
Computes a CRC remainder using lookup table.
- Parameters
data Data over which the remainder will be computed
size Size of the data, in bytes
lookupTable CRC lookup table
remainder Running CRC remainder. Can be an initial value or the result of a previous CRC remainder calculation.- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
CRC remainder
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::CalculateRemainderBits (unsigned char byte, crcpp_size numBits, const Parameters< CRCType, CRCWidth > & parameters, CRCType remainder) [inline], [static], [private]
const CRC::Parameters< crcpp_uint16, 10 > & CRC::CRC_10 () [inline], [static]
Returns a set of parameters for CRC-10 ITU.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-10 ITU has the following parameters and check value:
- polynomial = 0x233
- initial value = 0x000
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0x199
- Returns
CRC-10 ITU parameters
const CRC::Parameters< crcpp_uint16, 10 > & CRC::CRC_10_CDMA2000 () [inline], [static]
Returns a set of parameters for CRC-10 CDMA2000.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-10 CDMA2000 has the following parameters and check value:
- polynomial = 0x3D9
- initial value = 0x3FF
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0x233
- Returns
CRC-10 CDMA2000 parameters
const CRC::Parameters< crcpp_uint16, 11 > & CRC::CRC_11 () [inline], [static]
Returns a set of parameters for CRC-11 FlexRay.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-11 FlexRay has the following parameters and check value:
- polynomial = 0x385
- initial value = 0x01A
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0x5A3
- Returns
CRC-11 FlexRay parameters
const CRC::Parameters< crcpp_uint16, 11 > & CRC::CRC_11_NR () [inline], [static]
Returns a set of parameters for CRC-11 NR.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-11 NR has the following parameters and check value:
- polynomial = 0x621
- initial value = 0x000
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0x5CA
- Returns
CRC-11 NR parameters
const CRC::Parameters< crcpp_uint16, 12 > & CRC::CRC_12_CDMA2000 () [inline], [static]
Returns a set of parameters for CRC-12 CDMA2000.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-12 CDMA2000 has the following parameters and check value:
- polynomial = 0xF13
- initial value = 0xFFF
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0xD4D
- Returns
CRC-12 CDMA2000 parameters
const CRC::Parameters< crcpp_uint16, 12 > & CRC::CRC_12_DECT () [inline], [static]
Returns a set of parameters for CRC-12 DECT (aka CRC-12 X-CRC).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-12 DECT has the following parameters and check value:
- polynomial = 0x80F
- initial value = 0x000
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0xF5B
- Returns
CRC-12 DECT parameters
const CRC::Parameters< crcpp_uint16, 12 > & CRC::CRC_12_UMTS () [inline], [static]
Returns a set of parameters for CRC-12 UMTS (aka CRC-12 3GPP).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-12 UMTS has the following parameters and check value:
- polynomial = 0x80F
- initial value = 0x000
- final XOR = 0x000
- reflect input = false
- reflect output = true
- check value = 0xDAF
- Returns
CRC-12 UMTS parameters
const CRC::Parameters< crcpp_uint16, 13 > & CRC::CRC_13_BBC () [inline], [static]
Returns a set of parameters for CRC-13 BBC.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-13 BBC has the following parameters and check value:
- polynomial = 0x1CF5
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0x04FA
- Returns
CRC-13 BBC parameters
const CRC::Parameters< crcpp_uint16, 15 > & CRC::CRC_15 () [inline], [static]
Returns a set of parameters for CRC-15 CAN.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-15 CAN has the following parameters and check value:
- polynomial = 0x4599
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0x059E
- Returns
CRC-15 CAN parameters
const CRC::Parameters< crcpp_uint16, 15 > & CRC::CRC_15_MPT1327 () [inline], [static]
Returns a set of parameters for CRC-15 MPT1327.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-15 MPT1327 has the following parameters and check value:
- polynomial = 0x6815
- initial value = 0x0000
- final XOR = 0x0001
- reflect input = false
- reflect output = false
- check value = 0x2566
- Returns
CRC-15 MPT1327 parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_ARC () [inline], [static]
Returns a set of parameters for CRC-16 ARC (aka CRC-16 IBM, CRC-16 LHA).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 ARC has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = true
- reflect output = true
- check value = 0xBB3D
- Returns
CRC-16 ARC parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_BUYPASS () [inline], [static]
Returns a set of parameters for CRC-16 BUYPASS (aka CRC-16 VERIFONE, CRC-16 UMTS).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 BUYPASS has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0xFEE8
- Returns
CRC-16 BUYPASS parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_CCITTFALSE () [inline], [static]
Returns a set of parameters for CRC-16 CCITT FALSE.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 CCITT FALSE has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0x29B1
- Returns
CRC-16 CCITT FALSE parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_CDMA2000 () [inline], [static]
Returns a set of parameters for CRC-16 CDMA2000.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 CDMA2000 has the following parameters and check value:
- polynomial = 0xC867
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0x4C06
- Returns
CRC-16 CDMA2000 parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_CMS () [inline], [static]
Returns a set of parameters for CRC-16 CMS.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 CMS has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0xAEE7
- Returns
CRC-16 CMS parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_DECTR () [inline], [static]
Returns a set of parameters for CRC-16 DECT-R (aka CRC-16 R-CRC).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 DECT-R has the following parameters and check value:
- polynomial = 0x0589
- initial value = 0x0000
- final XOR = 0x0001
- reflect input = false
- reflect output = false
- check value = 0x007E
- Returns
CRC-16 DECT-R parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_DECTX () [inline], [static]
Returns a set of parameters for CRC-16 DECT-X (aka CRC-16 X-CRC).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 DECT-X has the following parameters and check value:
- polynomial = 0x0589
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0x007F
- Returns
CRC-16 DECT-X parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_DNP () [inline], [static]
Returns a set of parameters for CRC-16 DNP.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 DNP has the following parameters and check value:
- polynomial = 0x3D65
- initial value = 0x0000
- final XOR = 0xFFFF
- reflect input = true
- reflect output = true
- check value = 0xEA82
- Returns
CRC-16 DNP parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_GENIBUS () [inline], [static]
Returns a set of parameters for CRC-16 GENIBUS (aka CRC-16 EPC, CRC-16 I-CODE, CRC-16 DARC).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 GENIBUS has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0xFFFF
- final XOR = 0xFFFF
- reflect input = false
- reflect output = false
- check value = 0xD64E
- Returns
CRC-16 GENIBUS parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_KERMIT () [inline], [static]
Returns a set of parameters for CRC-16 KERMIT (aka CRC-16 CCITT, CRC-16 CCITT-TRUE).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 KERMIT has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = true
- reflect output = true
- check value = 0x2189
- Returns
CRC-16 KERMIT parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_MAXIM () [inline], [static]
Returns a set of parameters for CRC-16 MAXIM.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 MAXIM has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0x0000
- final XOR = 0xFFFF
- reflect input = true
- reflect output = true
- check value = 0x44C2
- Returns
CRC-16 MAXIM parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_MCRF4XX () [inline], [static]
Returns a set of parameters for CRC-16 MCRF4XX.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 MCRF4XX has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = true
- reflect output = true
- check value = 0x6F91
- Returns
CRC-16 MCRF4XX parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_MODBUS () [inline], [static]
Returns a set of parameters for CRC-16 MODBUS.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 MODBUS has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = true
- reflect output = true
- check value = 0x4B37
- Returns
CRC-16 MODBUS parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_T10DIF () [inline], [static]
Returns a set of parameters for CRC-16 T10-DIF.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 T10-DIF has the following parameters and check value:
- polynomial = 0x8BB7
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0xD0DB
- Returns
CRC-16 T10-DIF parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_USB () [inline], [static]
Returns a set of parameters for CRC-16 USB.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 USB has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0xFFFF
- final XOR = 0xFFFF
- reflect input = true
- reflect output = true
- check value = 0xB4C8
- Returns
CRC-16 USB parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_X25 () [inline], [static]
Returns a set of parameters for CRC-16 X-25 (aka CRC-16 IBM-SDLC, CRC-16 ISO-HDLC, CRC-16 B).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 X-25 has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0xFFFF
- final XOR = 0xFFFF
- reflect input = true
- reflect output = true
- check value = 0x906E
- Returns
CRC-16 X-25 parameters
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_XMODEM () [inline], [static]
Returns a set of parameters for CRC-16 XMODEM (aka CRC-16 ZMODEM, CRC-16 ACORN, CRC-16 LTE).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-16 XMODEM has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0x0000
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0x31C3
- Returns
CRC-16 XMODEM parameters
const CRC::Parameters< crcpp_uint32, 17 > & CRC::CRC_17_CAN () [inline], [static]
Returns a set of parameters for CRC-17 CAN.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-17 CAN has the following parameters and check value:
- polynomial = 0x1685B
- initial value = 0x00000
- final XOR = 0x00000
- reflect input = false
- reflect output = false
- check value = 0x04F03
- Returns
CRC-17 CAN parameters
const CRC::Parameters< crcpp_uint32, 21 > & CRC::CRC_21_CAN () [inline], [static]
Returns a set of parameters for CRC-21 CAN.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-21 CAN has the following parameters and check value:
- polynomial = 0x102899
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0x0ED841
- Returns
CRC-21 CAN parameters
const CRC::Parameters< crcpp_uint32, 24 > & CRC::CRC_24 () [inline], [static]
Returns a set of parameters for CRC-24 OPENPGP.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-24 OPENPGP has the following parameters and check value:
- polynomial = 0x864CFB
- initial value = 0xB704CE
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0x21CF02
- Returns
CRC-24 OPENPGP parameters
const CRC::Parameters< crcpp_uint32, 24 > & CRC::CRC_24_FLEXRAYA () [inline], [static]
Returns a set of parameters for CRC-24 FlexRay-A.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-24 FlexRay-A has the following parameters and check value:
- polynomial = 0x5D6DCB
- initial value = 0xFEDCBA
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0x7979BD
- Returns
CRC-24 FlexRay-A parameters
const CRC::Parameters< crcpp_uint32, 24 > & CRC::CRC_24_FLEXRAYB () [inline], [static]
Returns a set of parameters for CRC-24 FlexRay-B.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-24 FlexRay-B has the following parameters and check value:
- polynomial = 0x5D6DCB
- initial value = 0xABCDEF
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0x1F23B8
- Returns
CRC-24 FlexRay-B parameters
const CRC::Parameters< crcpp_uint32, 24 > & CRC::CRC_24_LTEA () [inline], [static]
Returns a set of parameters for CRC-24 LTE-A/NR-A.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-24 LTE-A has the following parameters and check value:
- polynomial = 0x864CFB
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0xCDE703
- Returns
CRC-24 LTE-A parameters
const CRC::Parameters< crcpp_uint32, 24 > & CRC::CRC_24_LTEB () [inline], [static]
Returns a set of parameters for CRC-24 LTE-B/NR-B.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-24 LTE-B has the following parameters and check value:
- polynomial = 0x800063
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0x23EF52
- Returns
CRC-24 LTE-B parameters
const CRC::Parameters< crcpp_uint32, 24 > & CRC::CRC_24_NRC () [inline], [static]
Returns a set of parameters for CRC-24 NR-C.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-24 NR-C has the following parameters and check value:
- polynomial = 0xB2B117
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0xF48279
- Returns
CRC-24 NR-C parameters
const CRC::Parameters< crcpp_uint32, 30 > & CRC::CRC_30 () [inline], [static]
Returns a set of parameters for CRC-30 CDMA.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-30 CDMA has the following parameters and check value:
- polynomial = 0x2030B9C7
- initial value = 0x3FFFFFFF
- final XOR = 0x00000000
- reflect input = false
- reflect output = false
- check value = 0x3B3CB540
- Returns
CRC-30 CDMA parameters
const CRC::Parameters< crcpp_uint32, 32 > & CRC::CRC_32 () [inline], [static]
Returns a set of parameters for CRC-32 (aka CRC-32 ADCCP, CRC-32 PKZip).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-32 has the following parameters and check value:
- polynomial = 0x04C11DB7
- initial value = 0xFFFFFFFF
- final XOR = 0xFFFFFFFF
- reflect input = true
- reflect output = true
- check value = 0xCBF43926
- Returns
CRC-32 parameters
const CRC::Parameters< crcpp_uint32, 32 > & CRC::CRC_32_BZIP2 () [inline], [static]
Returns a set of parameters for CRC-32 BZIP2 (aka CRC-32 AAL5, CRC-32 DECT-B, CRC-32 B-CRC).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-32 BZIP2 has the following parameters and check value:
- polynomial = 0x04C11DB7
- initial value = 0xFFFFFFFF
- final XOR = 0xFFFFFFFF
- reflect input = false
- reflect output = false
- check value = 0xFC891918
- Returns
CRC-32 BZIP2 parameters
const CRC::Parameters< crcpp_uint32, 32 > & CRC::CRC_32_C () [inline], [static]
Returns a set of parameters for CRC-32 C (aka CRC-32 ISCSI, CRC-32 Castagnoli, CRC-32 Interlaken).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-32 C has the following parameters and check value:
- polynomial = 0x1EDC6F41
- initial value = 0xFFFFFFFF
- final XOR = 0xFFFFFFFF
- reflect input = true
- reflect output = true
- check value = 0xE3069283
- Returns
CRC-32 C parameters
const CRC::Parameters< crcpp_uint32, 32 > & CRC::CRC_32_MPEG2 () [inline], [static]
Returns a set of parameters for CRC-32 MPEG-2.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-32 MPEG-2 has the following parameters and check value:
- polynomial = 0x04C11DB7
- initial value = 0xFFFFFFFF
- final XOR = 0x00000000
- reflect input = false
- reflect output = false
- check value = 0x0376E6E7
- Returns
CRC-32 MPEG-2 parameters
const CRC::Parameters< crcpp_uint32, 32 > & CRC::CRC_32_POSIX () [inline], [static]
Returns a set of parameters for CRC-32 POSIX.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-32 POSIX has the following parameters and check value:
- polynomial = 0x04C11DB7
- initial value = 0x00000000
- final XOR = 0xFFFFFFFF
- reflect input = false
- reflect output = false
- check value = 0x765E7680
- Returns
CRC-32 POSIX parameters
const CRC::Parameters< crcpp_uint32, 32 > & CRC::CRC_32_Q () [inline], [static]
Returns a set of parameters for CRC-32 Q.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-32 Q has the following parameters and check value:
- polynomial = 0x814141AB
- initial value = 0x00000000
- final XOR = 0x00000000
- reflect input = false
- reflect output = false
- check value = 0x3010BF7F
- Returns
CRC-32 Q parameters
const CRC::Parameters< crcpp_uint64, 40 > & CRC::CRC_40_GSM () [inline], [static]
Returns a set of parameters for CRC-40 GSM.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-40 GSM has the following parameters and check value:
- polynomial = 0x0004820009
- initial value = 0x0000000000
- final XOR = 0xFFFFFFFFFF
- reflect input = false
- reflect output = false
- check value = 0xD4164FC646
- Returns
CRC-40 GSM parameters
const CRC::Parameters< crcpp_uint8, 4 > & CRC::CRC_4_ITU () [inline], [static]
Returns a set of parameters for CRC-4 ITU.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-4 ITU has the following parameters and check value:
- polynomial = 0x3
- initial value = 0x0
- final XOR = 0x0
- reflect input = true
- reflect output = true
- check value = 0x7
- Returns
CRC-4 ITU parameters
const CRC::Parameters< crcpp_uint8, 5 > & CRC::CRC_5_EPC () [inline], [static]
Returns a set of parameters for CRC-5 EPC.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-5 EPC has the following parameters and check value:
- polynomial = 0x09
- initial value = 0x09
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0x00
- Returns
CRC-5 EPC parameters
const CRC::Parameters< crcpp_uint8, 5 > & CRC::CRC_5_ITU () [inline], [static]
Returns a set of parameters for CRC-5 ITU.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-5 ITU has the following parameters and check value:
- polynomial = 0x15
- initial value = 0x00
- final XOR = 0x00
- reflect input = true
- reflect output = true
- check value = 0x07
- Returns
CRC-5 ITU parameters
const CRC::Parameters< crcpp_uint8, 5 > & CRC::CRC_5_USB () [inline], [static]
Returns a set of parameters for CRC-5 USB.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-5 USB has the following parameters and check value:
- polynomial = 0x05
- initial value = 0x1F
- final XOR = 0x1F
- reflect input = true
- reflect output = true
- check value = 0x19
- Returns
CRC-5 USB parameters
const CRC::Parameters< crcpp_uint64, 64 > & CRC::CRC_64 () [inline], [static]
Returns a set of parameters for CRC-64 ECMA.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-64 ECMA has the following parameters and check value:
- polynomial = 0x42F0E1EBA9EA3693
- initial value = 0x0000000000000000
- final XOR = 0x0000000000000000
- reflect input = false
- reflect output = false
- check value = 0x6C40DF5F0B497347
- Returns
CRC-64 ECMA parameters
const CRC::Parameters< crcpp_uint8, 6 > & CRC::CRC_6_CDMA2000A () [inline], [static]
Returns a set of parameters for CRC-6 CDMA2000-A.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-6 CDMA2000-A has the following parameters and check value:
- polynomial = 0x27
- initial value = 0x3F
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0x0D
- Returns
CRC-6 CDMA2000-A parameters
const CRC::Parameters< crcpp_uint8, 6 > & CRC::CRC_6_CDMA2000B () [inline], [static]
Returns a set of parameters for CRC-6 CDMA2000-B.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-6 CDMA2000-A has the following parameters and check value:
- polynomial = 0x07
- initial value = 0x3F
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0x3B
- Returns
CRC-6 CDMA2000-B parameters
const CRC::Parameters< crcpp_uint8, 6 > & CRC::CRC_6_ITU () [inline], [static]
Returns a set of parameters for CRC-6 ITU.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-6 ITU has the following parameters and check value:
- polynomial = 0x03
- initial value = 0x00
- final XOR = 0x00
- reflect input = true
- reflect output = true
- check value = 0x06
- Returns
CRC-6 ITU parameters
const CRC::Parameters< crcpp_uint8, 6 > & CRC::CRC_6_NR () [inline], [static]
Returns a set of parameters for CRC-6 NR.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-6 NR has the following parameters and check value:
- polynomial = 0x21
- initial value = 0x00
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0x15
- Returns
CRC-6 NR parameters
const CRC::Parameters< crcpp_uint8, 7 > & CRC::CRC_7 () [inline], [static]
Returns a set of parameters for CRC-7 JEDEC.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-7 JEDEC has the following parameters and check value:
- polynomial = 0x09
- initial value = 0x00
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0x75
- Returns
CRC-7 JEDEC parameters
const CRC::Parameters< crcpp_uint8, 8 > & CRC::CRC_8 () [inline], [static]
Returns a set of parameters for CRC-8 SMBus.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-8 SMBus has the following parameters and check value:
- polynomial = 0x07
- initial value = 0x00
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0xF4
- Returns
CRC-8 SMBus parameters
const CRC::Parameters< crcpp_uint8, 8 > & CRC::CRC_8_EBU () [inline], [static]
Returns a set of parameters for CRC-8 EBU (aka CRC-8 AES).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-8 EBU has the following parameters and check value:
- polynomial = 0x1D
- initial value = 0xFF
- final XOR = 0x00
- reflect input = true
- reflect output = true
- check value = 0x97
- Returns
CRC-8 EBU parameters
const CRC::Parameters< crcpp_uint8, 8 > & CRC::CRC_8_HDLC () [inline], [static]
Returns a set of parameters for CRC-8 HDLC (ISO/IEC 13239:2002).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-8 HDLC has the following parameters and check value:
- polynomial = 0x07
- initial value = 0xFF
- final XOR = 0xFF
- reflect input = true
- reflect output = true
- check value = 0x2F
- Returns
CRC-8 HDLC parameters
const CRC::Parameters< crcpp_uint8, 8 > & CRC::CRC_8_LTE () [inline], [static]
Returns a set of parameters for CRC-8 LTE.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-8 LTE has the following parameters and check value:
- polynomial = 0x9B
- initial value = 0x00
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0xEA
- Returns
CRC-8 LTE parameters
const CRC::Parameters< crcpp_uint8, 8 > & CRC::CRC_8_MAXIM () [inline], [static]
Returns a set of parameters for CRC-8 MAXIM (aka CRC-8 DOW-CRC).
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-8 MAXIM has the following parameters and check value:
- polynomial = 0x31
- initial value = 0x00
- final XOR = 0x00
- reflect input = true
- reflect output = true
- check value = 0xA1
- Returns
CRC-8 MAXIM parameters
const CRC::Parameters< crcpp_uint8, 8 > & CRC::CRC_8_WCDMA () [inline], [static]
Returns a set of parameters for CRC-8 WCDMA.
- Note
The parameters are static and are delayed-constructed to reduce memory footprint.
CRC-8 WCDMA has the following parameters and check value:
- polynomial = 0x9B
- initial value = 0x00
- final XOR = 0x00
- reflect input = true
- reflect output = true
- check value = 0x25
- Returns
CRC-8 WCDMA parameters
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::Finalize (CRCType remainder, CRCType finalXOR, bool reflectOutput) [inline], [static], [private]
Computes the final reflection and XOR of a CRC remainder.
- Parameters
remainder CRC remainder to reflect and XOR
finalXOR Final value to XOR with the remainder
reflectOutput true to reflect each byte of the remainder before the XOR- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
Final CRC
CRC & CRC::operator= (const CRC & other) [delete]
CRC & CRC::operator= (CRC && other) [delete]
template<typename IntegerType> IntegerType CRC::Reflect (IntegerType value, crcpp_uint16 numBits) [inline], [static], [private]
Reflects (i.e. reverses the bits within) an integer value.
- Parameters
value Value to reflect
numBits Number of bits in the integer which will be reflected- Template Parameters
IntegerType Integer type of the value being reflected
- Returns
Reflected value
template<typename CRCType, crcpp_uint16 CRCWidth> CRCType CRC::UndoFinalize (CRCType crc, CRCType finalXOR, bool reflectOutput) [inline], [static], [private]
Undoes the process of computing the final reflection and XOR of a CRC remainder.
- Note
This function allows for computation of multi-part CRCs
Calling UndoFinalize() followed by Finalize() (or vice versa) will always return the original remainder value:
CRCType x = ...; CRCType y = Finalize(x, finalXOR, reflectOutput); CRCType z = UndoFinalize(y, finalXOR, reflectOutput); assert(x == z);
- Parameters
crc Reflected and XORed CRC
finalXOR Final value XORed with the remainder
reflectOutput true if the remainder is to be reflected- Template Parameters
CRCType Integer type for storing the CRC result
CRCWidth Number of bits in the CRC- Returns
Un-finalized CRC remainder
Author
Generated automatically by Doxygen for CRC++ from the source code.