CRC(3)
π CRC(3) π
Library Functions Manual π CRC(3)
β¨ NAME β¨
okay so bestie, lemme introduce you to the moment:
CRCβ a static class for computing CRCs. that's it. that's the whole vibe. π¦
likeβ¦ no instance, no new, no nothing β you just call it and it works, and honestly? iconic behavior fr fr π
lowkey the plot is about to thicken tho β this page is a whole saga, so stay tuned for more π
β¨ SYNOPSIS β¨
okay so first thing's first, bestie, you gotta pull in the header π
#include <CRC.h>
𧬠Classes
struct Parametersβ your CRC parameters, the whole vibe recipe right here πstruct Tableβ a CRC lookup table. heads up: once it's constructed, the CRC parameters are locked in, no takebacks π
π Public Member Functions
sooo these are all =deleted, which means the compiler is like "not me allowing any of this" π no copying, no moving, nada:
CRC()=deleteCRC(const CRC &other)=deleteCRC & operator=(const CRC &other)=deleteCRC(CRC &&other)=deleteCRC & operator=(CRC &&other)=delete
π Static Public Member Functions
this is the main character section fr fr π
π¦ Calculate (the Parameters flavor)
template<typename CRCType, crcpp_uint16 CRCWidth> static CRCType Calculate(const void *data, crcpp_size size, const Parameters<CRCType, CRCWidth> ¶meters)β bestie, this one just computes a CRC. that's the whole job β¨template<typename CRCType, crcpp_uint16 CRCWidth> static CRCType Calculate(const void *data, crcpp_size size, const Parameters<CRCType, CRCWidth> ¶meters, CRCType crc)β you already did a CRC and now you wanna toss more data on top of it? this appends additional data to a previous CRC calculation π
πΈ Calculate (the Table flavor)
template<typename CRCType, crcpp_uint16 CRCWidth> static CRCType Calculate(const void *data, crcpp_size size, const Table<CRCType, CRCWidth> &lookupTable)β computes a CRC, but it goes through a lookup table this time ποΈ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 π«Ά
π§ CalculateBits (the Parameters flavor)
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 π
π CalculateBits (the Table flavor)
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 β¨
π The Iconic Parameter Getters
each one of these hands you back a set of parameters, and honestly? they ate π
static const Parameters<crcpp_uint8, 4> & CRC_4_ITU()β returns a set of parameters for CRC-4 ITUstatic const Parameters<crcpp_uint8, 5> & CRC_5_EPC()β returns a set of parameters for CRC-5 EPCstatic const Parameters<crcpp_uint8, 5> & CRC_5_ITU()β returns a set of parameters for CRC-5 ITUstatic const Parameters<crcpp_uint8, 5> & CRC_5_USB()β returns a set of parameters for CRC-5 USBstatic const Parameters<crcpp_uint8, 6> & CRC_6_CDMA2000A()β returns a set of parameters for CRC-6 CDMA2000-Astatic const Parameters<crcpp_uint8, 6> & CRC_6_CDMA2000B()β returns a set of parameters for CRC-6 CDMA2000-Bstatic const Parameters<crcpp_uint8, 6> & CRC_6_ITU()β returns a set of parameters for CRC-6 ITUstatic const Parameters<crcpp_uint8, 6> & CRC_6_NR()β returns a set of parameters for CRC-6 NRstatic const Parameters<crcpp_uint8, 7> & CRC_7()β returns a set of parameters for CRC-7 JEDECstatic const Parameters<crcpp_uint8, 8> & CRC_8()β returns a set of parameters for CRC-8 SMBusstatic 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 WCDMAstatic const Parameters<crcpp_uint8, 8> & CRC_8_LTE()β returns a set of parameters for CRC-8 LTEstatic const Parameters<crcpp_uint16, 10> & CRC_10()β returns a set of parameters for CRC-10 ITUstatic const Parameters<crcpp_uint16, 10> & CRC_10_CDMA2000()β returns a set of parameters for CRC-10 CDMA2000static const Parameters<crcpp_uint16, 11> & CRC_11()β returns a set of parameters for CRC-11 FlexRaystatic const Parameters<crcpp_uint16, 11> & CRC_11_NR()β returns a set of parameters for CRC-11 NRstatic const Parameters<crcpp_uint16, 12> & CRC_12_CDMA2000()β returns a set of parameters for CRC-12 CDMA2000static 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 BBCstatic const Parameters<crcpp_uint16, 15> & CRC_15()β returns a set of parameters for CRC-15 CANstatic const Parameters<crcpp_uint16, 15> & CRC_15_MPT1327()β returns a set of parameters for CRC-15 MPT1327static 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 FALSEstatic const Parameters<crcpp_uint16, 16> & CRC_16_MCRF4XX()β returns a set of parameters for CRC-16 MCRF4XXstatic const Parameters<crcpp_uint16, 16> & CRC_16_CDMA2000()β returns a set of parameters for CRC-16 CDMA2000static const Parameters<crcpp_uint16, 16> & CRC_16_CMS()β returns a set of parameters for CRC-16 CMSstatic 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 DNPstatic 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 MAXIMstatic const Parameters<crcpp_uint16, 16> & CRC_16_MODBUS()β returns a set of parameters for CRC-16 MODBUSstatic const Parameters<crcpp_uint16, 16> & CRC_16_T10DIF()β returns a set of parameters for CRC-16 T10-DIFstatic const Parameters<crcpp_uint16, 16> & CRC_16_USB()β returns a set of parameters for CRC-16 USBstatic 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 CANstatic const Parameters<crcpp_uint32, 21> & CRC_21_CAN()β returns a set of parameters for CRC-21 CANstatic const Parameters<crcpp_uint32, 24> & CRC_24()β returns a set of parameters for CRC-24 OPENPGPstatic const Parameters<crcpp_uint32, 24> & CRC_24_FLEXRAYA()β returns a set of parameters for CRC-24 FlexRay-Astatic const Parameters<crcpp_uint32, 24> & CRC_24_FLEXRAYB()β returns a set of parameters for CRC-24 FlexRay-Bstatic const Parameters<crcpp_uint32, 24> & CRC_24_LTEA()β returns a set of parameters for CRC-24 LTE-A/NR-Astatic const Parameters<crcpp_uint32, 24> & CRC_24_LTEB()β returns a set of parameters for CRC-24 LTE-B/NR-Bstatic const Parameters<crcpp_uint32, 24> & CRC_24_NRC()β returns a set of parameters for CRC-24 NR-Cstatic const Parameters<crcpp_uint32, 30> & CRC_30()β returns a set of parameters for CRC-30 CDMAstatic 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-2static const Parameters<crcpp_uint32, 32> & CRC_32_POSIX()β returns a set of parameters for CRC-32 POSIXstatic const Parameters<crcpp_uint32, 32> & CRC_32_Q()β returns a set of parameters for CRC-32 Qstatic const Parameters<crcpp_uint64, 40> & CRC_40_GSM()β returns a set of parameters for CRC-40 GSMstatic const Parameters<crcpp_uint64, 64> & CRC_64()β returns a set of parameters for CRC-64 ECMA
π Static Private Member Functions
these are the backstage crew, not for your hands bestie, they're private π but here's what they do:
template<typename IntegerType> static IntegerType Reflect(IntegerType value, crcpp_uint16 numBits)β reflects an integer value, meaning it reverses the bits within it πͺ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 whole computing-the-final-reflection-and-XOR-of-a-CRC-remainder process, yes it reverses the reverse π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, but with a lookup table this time ποΈtemplate<typename CRCType, crcpp_uint16 CRCWidth> static CRCType CalculateRemainderBits(unsigned char byte, crcpp_size numBits, const Parameters<CRCType, CRCWidth> ¶meters, CRCType remainder)β yeah it's this one π
π DETAILED DESCRIPTION π
Static class for computing CRCs. That's it, that's the vibe β everything lives on the class itself, no objects required, no new, no drama. π«Ά
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. Like, the compiler is doing your homework before class even starts. β¨
π Constructor & Destructor Documentation π
π« CRC::CRC() [delete]
π« CRC::CRC(const CRC & other) [delete]
π« CRC::CRC(CRC && other) [delete]
All three are deleted. Not me making a class you literally cannot instantiate π β that's the whole point, bestie, it's a static class, you're supposed to call the functions directly.
π Member Function Documentation π
π CRC::Calculate β the parameters girlie
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. The classic. The original. The main character. π
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in bytesparametersβ CRC parameters
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
π CRC::Calculate β the appending one
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. Feed it the crc you got last time and it picks right back up, no cap. π₯
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in bytesparametersβ CRC parameterscrcβ CRC from a previous calculation
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
π¦ CRC::Calculate β the lookup table one
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. It's giving fast and organized. β¨
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in byteslookupTableβ CRC lookup table
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
π¦ CRC::Calculate β the lookup table appending one
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. Again. Because we love options. π
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in byteslookupTableβ CRC lookup tablecrcβ CRC from a previous calculation
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
πΈ CRC::CalculateBits β bits edition, parameters
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. But make it β¨bitsβ¨.
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in bitsparametersβ CRC parameters
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
πΈ CRC::CalculateBits β bits edition, appending
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. Yes bestie, it does the multi-part thing too. π«Ά
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in bitsparametersβ CRC parameterscrcβ CRC from a previous calculation
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
π§ CRC::CalculateBits β bits edition, lookup table
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 computedsizeβ Size of the data, in bitslookupTableβ CRC lookup table
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
π§ CRC::CalculateBits β bits edition, lookup table, appending
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. Okay so that's the last time I say that in this stretch, promise. π
Parameters
dataβ Data over which CRC will be computedsizeβ Size of the data, in bitslookupTableβ CRC lookup tablecrcβ CRC from a previous calculation
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns
- CRC
π CRC::CalculateRemainder β private, parameters
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. Shhh, this one's private, you didn't see it. π€«
Parameters
dataβ Data over which the remainder will be computedsizeβ Size of the data, in bytesparametersβ CRC parametersremainderβ 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 resultCRCWidthβ Number of bits in the CRC
Returns
- CRC remainder
π CRC::CalculateRemainder β private, lookup table
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 computedsizeβ Size of the data, in byteslookupTableβ CRC lookup tableremainderβ 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 resultCRCWidthβ Number of bits in the CRC
Returns
- CRC remainder
π CRC::CalculateRemainderBits β private, bits
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]
π CRC::CRC_10
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
π CRC::CRC_10_CDMA2000
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
π CRC::CRC_11
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
π CRC::CRC_11_NR
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
π CRC::CRC_12_CDMA2000
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
π CRC::CRC_12_DECT
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
π CRC::CRC_12_UMTS
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
π CRC::CRC_13_BBC
const CRC::Parameters< crcpp_uint16, 13 > & CRC::CRC_13_BBC()
[inline], [static]
Returns a set of parameters for CRC-13 BBC.
π‘ Note: the params here are static and delayed-constructed so they don't gobbling up your memory footprint the second the program starts. Okay so I'm gonna say this for literally every single one below because it's true for every single one below, bestie π«Ά
CRC-13 BBC comes with these params and this check value:
polynomial=0x1CF5initial value=0x0000final XOR=0x0000reflect input=falsereflect output=falsecheck value=0x04FA
Returns: CRC-13 BBC parameters β¨
const CRC::Parameters< crcpp_uint16, 15 > & CRC::CRC_15 () [inline], [static]
Hands you a set of parameters for CRC-15 CAN. π
π‘ Note: static + delayed-constructed = tiny memory footprint, no cap.
CRC-15 CAN's params and check value, right here:
polynomial=0x4599initial value=0x0000final XOR=0x0000reflect input=falsereflect output=falsecheck value=0x059E
Returns: CRC-15 CAN parameters π
const CRC::Parameters< crcpp_uint16, 15 > & CRC::CRC_15_MPT1327 () [inline], [static]
Gives you the parameters for CRC-15 MPT1327. πΈ
π‘ Note: these are static and delayed-constructed to keep the memory footprint low.
CRC-15 MPT1327, params + check value:
polynomial=0x6815initial value=0x0000final XOR=0x0001reflect input=falsereflect output=falsecheck value=0x2566
Returns: CRC-15 MPT1327 parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_ARC () [inline], [static]
Returns the params for CRC-16 ARC β aka CRC-16 IBM, aka CRC-16 LHA. She has many names, she's that girl. π
π‘ Note: static and delayed-constructed, so memory footprint stays cute.
CRC-16 ARC's params and check value:
polynomial=0x8005initial value=0x0000final XOR=0x0000reflect input=truereflect output=truecheck value=0xBB3D
Returns: CRC-16 ARC parameters π₯
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_BUYPASS () [inline], [static]
Returns the params for CRC-16 BUYPASS β also known as CRC-16 VERIFONE and CRC-16 UMTS. π¦
π‘ Note: parameters are static and delayed-constructed to reduce memory footprint.
CRC-16 BUYPASS, params and check value:
polynomial=0x8005initial value=0x0000final XOR=0x0000reflect input=falsereflect output=falsecheck value=0xFEE8
Returns: CRC-16 BUYPASS parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_CCITTFALSE () [inline], [static]
Returns the parameter set for CRC-16 CCITT FALSE. (Yes, that's really the name β "FALSE" is giving mysterious but okay. π)
π‘ Note: these are static and delayed-constructed, all to keep the memory footprint down.
CRC-16 CCITT FALSE, params and check value:
polynomial=0x1021initial value=0xFFFFfinal XOR=0x0000reflect input=falsereflect output=falsecheck value=0x29B1
Returns: CRC-16 CCITT FALSE parameters β¨
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_CDMA2000 () [inline], [static]
Hands back the params for CRC-16 CDMA2000. π±
π‘ Note: static + delayed-constructed so your memory footprint doesn't cry.
CRC-16 CDMA2000's params and check value:
polynomial=0xC867initial value=0xFFFFfinal XOR=0x0000reflect input=falsereflect output=falsecheck 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 params are static and delayed-constructed, which keeps the memory footprint small.
CRC-16 CMS, params and check value:
polynomial=0x8005initial value=0xFFFFfinal XOR=0x0000reflect input=falsereflect output=falsecheck value=0xAEE7
Returns: CRC-16 CMS parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_DECTR () [inline], [static]
Returns the params for CRC-16 DECT-R β aka CRC-16 R-CRC. β¨
π‘ Note: static and delayed-constructed, for that reduced memory footprint.
CRC-16 DECT-R, params and check value:
polynomial=0x0589initial value=0x0000final XOR=0x0001reflect input=falsereflect output=falsecheck value=0x007E
Returns: CRC-16 DECT-R parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_DECTX () [inline], [static]
Returns the params for CRC-16 DECT-X β aka CRC-16 X-CRC. The sister of the one above, iconic duo fr. π
π‘ Note: parameters are static and delayed-constructed to reduce memory footprint.
CRC-16 DECT-X, params and check value:
polynomial=0x0589initial value=0x0000final XOR=0x0000reflect input=falsereflect output=falsecheck 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: static and delayed-constructed to reduce memory footprint. (Yes, still. Every time. That's the vibe.)
CRC-16 DNP, params and check value:
polynomial=0x3D65initial value=0x0000final XOR=0xFFFFreflect input=truereflect output=truecheck value=0xEA82
Returns: CRC-16 DNP parameters π¦
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_GENIBUS () [inline], [static]
Returns the params for CRC-16 GENIBUS β aka CRC-16 EPC, aka CRC-16 I-CODE, aka CRC-16 DARC. So many aliases, so little time. π
π‘ Note: these are static and delayed-constructed, keeping the memory footprint tiny.
CRC-16 GENIBUS, params and check value:
polynomial=0x1021initial value=0xFFFFfinal XOR=0xFFFFreflect input=falsereflect output=falsecheck value=0xD64E
Returns: CRC-16 GENIBUS parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_KERMIT () [inline], [static]
Returns the params for CRC-16 KERMIT β aka CRC-16 CCITT, aka CRC-16 CCITT-TRUE. πΈ
π‘ Note: the parameters are static and delayed-constructed, to reduce memory footprint.
CRC-16 KERMIT, params and check value:
polynomial=0x1021initial value=0x0000final XOR=0x0000reflect input=truereflect output=truecheck 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: static, delayed-constructed, small memory footprint. Slay.
CRC-16 MAXIM, params and check value:
polynomial=0x8005initial value=0x0000final XOR=0xFFFFreflect input=truereflect output=truecheck value=0x44C2
Returns: CRC-16 MAXIM parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_MCRF4XX () [inline], [static]
Returns the params for CRC-16 MCRF4XX. β¨
π‘ Note: params are static and delayed-constructed, so the memory footprint stays reduced.
CRC-16 MCRF4XX, params and check value:
polynomial=0x1021initial value=0xFFFFfinal XOR=0x0000reflect input=truereflect output=truecheck value=0x6F91
Returns: CRC-16 MCRF4XX parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_MODBUS () [inline], [static]
Returns the params for CRC-16 MODBUS. The legend herself. π
π‘ Note: static and delayed-constructed to reduce memory footprint.
CRC-16 MODBUS, params and check value:
polynomial=0x8005initial value=0xFFFFfinal XOR=0x0000reflect input=truereflect output=truecheck 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: these are static and delayed-constructed, keeping that memory footprint low.
CRC-16 T10-DIF, params and check value:
polynomial=0x8BB7initial value=0x0000final XOR=0x0000reflect input=falsereflect output=falsecheck value=0xD0DB
Returns: CRC-16 T10-DIF parameters πΈ
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_USB () [inline], [static]
Returns the params for CRC-16 USB. π
π‘ Note: parameters are static and delayed-constructed to reduce memory footprint.
CRC-16 USB, params and check value:
polynomial=0x8005initial value=0xFFFFfinal XOR=0xFFFFreflect input=truereflect output=truecheck value=0xB4C8
Returns: CRC-16 USB parameters π
const CRC::Parameters< crcpp_uint16, 16 > & CRC::CRC_16_X25 () [inline], [static]
Returns the params for CRC-16 X-25 β aka CRC-16 IBM-SDLC, aka CRC-16 ISO-HDLC, aka CRC-16 B. The alias queen, honestly. π
π‘ Note: static and delayed-constructed, all to keep the memory footprint down.
CRC-16 X-25, params and check value:
polynomial=0x1021initial value=0xFFFFfinal XOR=0xFFFFreflect input=truereflect output=truecheck 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, aka CRC-16 ACORN, aka CRC-16 LTE. π
Quick note bestie β these params are static and delayed-constructed so the memory footprint stays cute and tiny. π
CRC-16 XMODEM is serving these params and this 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]
Hands you a whole set of parameters for CRC-17 CAN. β¨
Little heads up: the parameters are static and delayed-constructed, which is the whole reason the memory footprint stays smol. π«Ά
CRC-17 CAN is rocking these params 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]
Gives you the parameter set for CRC-21 CAN, no cap. π
Note: the parameters are static and delayed-constructed to keep that memory footprint low. Iconic behaviour honestly.
CRC-21 CAN's params and check value, bestie:
- 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, and this is important: the parameters are static and delayed-constructed so the memory footprint doesn't get out of pocket.
CRC-24 OPENPGP has these params and this 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]
Serves up a set of parameters for CRC-24 FlexRay-A. π
Note: the parameters are static and delayed-constructed, all to reduce the memory footprint. The way they optimized this⦠obsessed.
CRC-24 FlexRay-A has these params 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]
Gives you the parameters for CRC-24 FlexRay-B. π
Note bestie: the parameters are static and delayed-constructed, which is how the memory footprint stays small. π
CRC-24 FlexRay-B is running these params and this 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 the parameter set for CRC-24 LTE-A/NR-A. π«Ά
Note: the parameters are static and delayed-constructed to reduce the memory footprint. Fr fr, that's the reason.
CRC-24 LTE-A has these params and this 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]
Hands over the parameters for CRC-24 LTE-B/NR-B. π
Note: the parameters are static and delayed-constructed, and that's on reducing the memory footprint. π
CRC-24 LTE-B's params 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 delayed-constructed so the memory footprint stays low. It's giving efficiency.
CRC-24 NR-C has these params and this 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]
Gives you a set of parameters for CRC-30 CDMA. π₯
Note: the parameters are static and delayed-constructed, all in the name of a smaller memory footprint. π
CRC-30 CDMA is serving these params and this 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). This one is lowkey famous, bestie. β¨
Note: the parameters are static and delayed-constructed to reduce the memory footprint. π
CRC-32 has these params and this 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). So many nicknames, main character energy honestly. π
Note: the parameters are static and delayed-constructed so the memory footprint stays smol. π«Ά
CRC-32 BZIP2's params 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). A whole squad of aliases. π
Note: the parameters are static and delayed-constructed to reduce the memory footprint. Periodt.
CRC-32 C has these params and this 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]
Hands you a set of parameters for CRC-32 MPEG-2. π¦
Note: the parameters are static and delayed-constructed, because memory footprint reduction is the moment. π
CRC-32 MPEG-2 is running these params and this 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 bestie: the parameters are static and delayed-constructed to reduce the memory footprint. It ate, ngl.
CRC-32 POSIX has these params and this 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]
Gives you a set of parameters for CRC-32 Q. π₯
Note: the parameters are static and delayed-constructed so the memory footprint stays tiny. π
CRC-32 Q's params 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. Notice it's a crcpp_uint64 situation, we love range. π
Note: the parameters are static and delayed-constructed to reduce the memory footprint. π
CRC-40 GSM has these params and this 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. Baby-sized, crcpp_uint8 core. π¦
Note: the parameters are static and delayed-constructed to reduce the memory footprint. π
CRC-4 ITU is serving these params and this 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 delayed-constructed so the memory footprint stays low. β¨
CRC-5 EPC has these params and this 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 delayed-constructed to reduce the memory footprint. π
CRC-5 ITU has the following parameters and check value:
polynomial = 0x15initial value = 0x00final XOR = 0x00reflect input = truereflect output = truecheck value = 0x07
Returns β CRC-5 ITU parameters
β¨ CRC_5_USB() β¨
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 = 0x05initial value = 0x1Ffinal XOR = 0x1Freflect input = truereflect output = truecheck value = 0x19
Returns β CRC-5 USB parameters
β¨ CRC_64() β¨
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 = 0x42F0E1EBA9EA3693initial value = 0x0000000000000000final XOR = 0x0000000000000000reflect input = falsereflect output = falsecheck value = 0x6C40DF5F0B497347
Returns β CRC-64 ECMA parameters
β¨ CRC_6_CDMA2000A() β¨
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 = 0x27initial value = 0x3Ffinal XOR = 0x00reflect input = falsereflect output = falsecheck value = 0x0D
Returns β CRC-6 CDMA2000-A parameters
β¨ CRC_6_CDMA2000B() β¨
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 = 0x07initial value = 0x3Ffinal XOR = 0x00reflect input = falsereflect output = falsecheck value = 0x3B
Returns β CRC-6 CDMA2000-B parameters
β¨ CRC_6_ITU() β¨
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 = 0x03initial value = 0x00final XOR = 0x00reflect input = truereflect output = truecheck value = 0x06
Returns β CRC-6 ITU parameters
β¨ CRC_6_NR() β¨
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 = 0x21initial value = 0x00final XOR = 0x00reflect input = falsereflect output = falsecheck value = 0x15
Returns β CRC-6 NR parameters
β¨ CRC_7() β¨
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 = 0x09initial value = 0x00final XOR = 0x00reflect input = falsereflect output = falsecheck value = 0x75
Returns β CRC-7 JEDEC parameters
β¨ CRC_8() β¨
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 = 0x07initial value = 0x00final XOR = 0x00reflect input = falsereflect output = falsecheck value = 0xF4
Returns β CRC-8 SMBus parameters
β¨ CRC_8_EBU() β¨
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 = 0x1Dinitial value = 0xFFfinal XOR = 0x00reflect input = truereflect output = truecheck value = 0x97
Returns β CRC-8 EBU parameters
β¨ CRC_8_HDLC() β¨
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 = 0x07initial value = 0xFFfinal XOR = 0xFFreflect input = truereflect output = truecheck value = 0x2F
Returns β CRC-8 HDLC parameters
β¨ CRC_8_LTE() β¨
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 = 0x9Binitial value = 0x00final XOR = 0x00reflect input = falsereflect output = falsecheck value = 0xEA
Returns β CRC-8 LTE parameters
β¨ CRC_8_MAXIM() β¨
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 = 0x31initial value = 0x00final XOR = 0x00reflect input = truereflect output = truecheck value = 0xA1
Returns β CRC-8 MAXIM parameters
β¨ CRC_8_WCDMA() β¨
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 = 0x9Binitial value = 0x00final XOR = 0x00reflect input = truereflect output = truecheck value = 0x25
Returns β CRC-8 WCDMA parameters
β¨ Finalize() β¨
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 XORfinalXORβ Final value to XOR with the remainderreflectOutputβtrueto reflect each byte of the remainder before the XOR
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns β Final CRC
β¨ operator= β¨
CRC & CRC::operator= (const CRC & other) [delete]
CRC & CRC::operator= (CRC && other) [delete]
Both are deleted, so don't even think about copying or moving. π«π
β¨ Reflect() β¨
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 reflectnumBitsβ Number of bits in the integer which will be reflected
Template Parameters
IntegerTypeβ Integer type of the value being reflected
Returns β Reflected value
β¨ UndoFinalize() β¨
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.
CallingUndoFinalize()followed byFinalize()(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 CRCfinalXORβ Final value XORed with the remainderreflectOutputβtrueif the remainder is to be reflected
Template Parameters
CRCTypeβ Integer type for storing the CRC resultCRCWidthβ Number of bits in the CRC
Returns β Un-finalized CRC remainder
βοΈ Author βοΈ
Generated automatically by Doxygen for CRC++ from the source code.
And that's the tea, bestie! This page is from CRC++ Version 1.0.1.0 and it's the CRC(3) manual. Stay iconic. πβ¨
π¦ where this page comes from
- fedora 43: crcpp-devel 1.2.1.0-1.fc43 Β· BSD-3-Clause
- fedora 43: crcpp-devel 1.2.1.0-1.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms