Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
qlibs::crc Class Reference

#include <crc.hpp>

Static Public Member Functions

static uint32_t generic (crcMode mode, const void *const pData, const size_t length, uint32_t poly, const uint32_t init=0U, bool refIn=false, bool refOut=false, uint32_t xorOut=0U) noexcept
 Calculates in one pass the common width bit CRC value for a block of data that is passed to the function together with a parameter indicating the length.
 
static uint8_t crc8 (const void *const pData, const size_t length) noexcept
 CRC-8 with poly = 0x07 init = 0x00 refIn = false refOut = false xorOut= 0x00.
 
static uint8_t crc8_CDMA2000 (const void *const pData, const size_t length) noexcept
 CRC-8/CDMA2000 with poly = 0x9B init = 0xFF refIn = false refOut = false xorOut= 0x00.
 
static uint8_t crc8_DARC (const void *const pData, const size_t length) noexcept
 CRC-8/DARC with poly = 0x39 init = 0x00 refIn = true refOut = true xorOut= 0x00.
 
static uint8_t crc8_DVS_S2 (const void *const pData, const size_t length) noexcept
 CRC-8/DVS-S2 with poly = 0xD5 init = 0x00 refIn = false refOut = false xorOut= 0x00.
 
static uint8_t crc8_EBU (const void *const pData, const size_t length) noexcept
 CRC-8/EBU with poly = 0x1D init = 0xFF refIn = true refOut = true xorOut= 0x00.
 
static uint8_t crc8_I_CODE (const void *const pData, const size_t length) noexcept
 CRC-8/I-CODE with poly = 0x1D init = 0xFD refIn = false refOut = false xorOut= 0x00.
 
static uint8_t crc8_ITU (const void *const pData, const size_t length) noexcept
 CRC-8/ITU with poly = 0x07 init = 0x00 refIn = false refOut = false xorOut= 0x55.
 
static uint8_t crc8_MAXIM (const void *const pData, const size_t length) noexcept
 CRC-8/MAXIM with poly = 0x31 init = 0x00 refIn = true refOut = true xorOut= 0x00.
 
static uint8_t crc8_ROHC (const void *const pData, const size_t length) noexcept
 CRC-8/ROHC with poly = 0x07 init = 0xFF refIn = true refOut = true xorOut= 0x00.
 
static uint8_t crc8_WCDMA (const void *const pData, const size_t length) noexcept
 CRC-8/WCDMA with poly = 0x9B init = 0x00 refIn = true refOut = true xorOut= 0x00.
 
static uint16_t crc16_CCITT_FALSE (const void *const pData, const size_t length) noexcept
 CRC-16/CCITT-FALSE with poly = 0x1021 init = 0xFFFF refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_ARC (const void *const pData, const size_t length) noexcept
 CRC-16/ARC with poly = 0x8005 init = 0x0000 refIn = true refOut = true xorOut= 0x0000.
 
static uint16_t crc16_AUG_CCITT (const void *const pData, const size_t length) noexcept
 CRC-16/AUG-CCITT with poly = 0x1021 init = 0x1D0F refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_BUYPASS (const void *const pData, const size_t length) noexcept
 CRC-16/BUYPASS with poly = 0x8005 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_CDMA2000 (const void *const pData, const size_t length) noexcept
 CRC-16/CDMA2000 with poly = 0xC867 init = 0xFFFF refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_DDS_110 (const void *const pData, const size_t length) noexcept
 CRC-16/DDS-110 with poly = 0x8005 init = 0x800D refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_DECT_R (const void *const pData, const size_t length) noexcept
 CRC-16/DECT-R with poly = 0x0589 init = 0x0000 refIn = false refOut = false xorOut= 0x0001.
 
static uint16_t crc16_DECT_X (const void *const pData, const size_t length) noexcept
 CRC-16/DECT-X with poly = 0x0589 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_DNP (const void *const pData, const size_t length) noexcept
 CRC-16/DNP with poly = 0x3D98 init = 0x0000 refIn = true refOut = true xorOut= 0xFFFF.
 
static uint16_t crc16_EN_13757 (const void *const pData, const size_t length) noexcept
 CRC-16/EN-13757 with poly = 0x3D65 init = 0x0000 refIn = false refOut = false xorOut= 0xFFFF.
 
static uint16_t crc16_GENIBUS (const void *const pData, const size_t length) noexcept
 CRC-16/GENIBUS with poly = 0x1021 init = 0xFFFF refIn = false refOut = false xorOut= 0xFFFF.
 
static uint16_t crc16_MAXIM (const void *const pData, const size_t length) noexcept
 CRC-16/MAXIM with poly = 0x8005 init = 0x0000 refIn = true refOut = true xorOut= 0xFFFF.
 
static uint16_t crc16_MCRF4XX (const void *const pData, const size_t length) noexcept
 CRC-16/MCRF4XX with poly = 0x1021 init = 0xFFFF refIn = true refOut = true xorOut= 0x0000.
 
static uint16_t crc16_RIELLO (const void *const pData, const size_t length) noexcept
 CRC-16/RIELLO with poly = 0x1021 init = 0xB2AA refIn = true refOut = true xorOut= 0x0000.
 
static uint16_t crc16_T10_DIF (const void *const pData, const size_t length) noexcept
 CRC-16/DECT-X with poly = 0x8bb7 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_TELEDISK (const void *const pData, const size_t length) noexcept
 CRC-16/TELEDISK with poly = 0xA097 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.
 
static uint16_t crc16_TMS37157 (const void *const pData, const size_t length) noexcept
 CRC-16/TMS37157 with poly = 0x1021 init = 0x89EC refIn = true refOut = true xorOut= 0x000.
 
static uint16_t crc16_USB (const void *const pData, const size_t length) noexcept
 CRC-16/USB with poly = 0x8005 init = 0xFFFF refIn = true refOut = true xorOut= 0xFFFF.
 
static uint16_t crc16_A (const void *const pData, const size_t length) noexcept
 CRC-A with poly = 0x1021 init = 0xC6C6 refIn = true refOut = true xorOut= 0x0000.
 
static uint16_t crc16_KERMIT (const void *const pData, const size_t length) noexcept
 CRC-16/KERMIT with poly = 0x1021 init = 0x0000 refIn = true refOut = true xorOut= 0x000.
 
static uint16_t crc16_MODBUS (const void *const pData, const size_t length) noexcept
 CRC-16/MODBUS with poly = 0x8005 init = 0xFFFF refIn = true refOut = true xorOut= 0x0000.
 
static uint16_t crc16_X_25 (const void *const pData, const size_t length) noexcept
 CRC-16/X-25 with poly = 0x1021 init = 0xFFFF refIn = true refOut = true xorOut= 0xFFFF.
 
static uint16_t crc16_XMODEM (const void *const pData, const size_t length) noexcept
 CRC-16/XMODEM with poly = 0x1021 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.
 
static uint32_t crc32 (const void *const pData, const size_t length) noexcept
 CRC-32 with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0xFFFFFFFF.
 
static uint32_t crc32_BZIP2 (const void *const pData, const size_t length) noexcept
 CRC-32/BZIP2 with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = false refOut = false xorOut= 0xFFFFFFFF.
 
static uint32_t crc32_C (const void *const pData, const size_t length) noexcept
 CRC-32C with poly = 0x1EDC6F41 init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0xFFFFFFFF.
 
static uint32_t crc32_D (const void *const pData, const size_t length) noexcept
 CRC-32D with poly = 0xA833982B init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0xFFFFFFFF.
 
static uint32_t crc32_JAMCRC (const void *const pData, const size_t length) noexcept
 CRC-32/JAMCRC with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0x00000000.
 
static uint32_t crc32_MPEG2 (const void *const pData, const size_t length) noexcept
 CRC-32/MPEG2 with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = false refOut = false xorOut= 0x00000000.
 
static uint32_t crc32_POSIX (const void *const pData, const size_t length) noexcept
 CRC-32/POSIX with poly = 0x04C11DB7 init = 0x00000000 refIn = false refOut = false xorOut= 0xFFFFFFFF.
 
static uint32_t crc32_Q (const void *const pData, const size_t length) noexcept
 CRC-32Q with poly = 0x814141AB init = 0x00000000 refIn = false refOut = false xorOut= 0x00000000.
 
static uint32_t crc32_XFER (const void *const pData, const size_t length) noexcept
 CRC-32/XFER with poly = 0x000000AF init = 0x00000000 refIn = false refOut = false xorOut= 0x00000000.
 

Member Function Documentation

◆ crc16_A()

static uint16_t qlibs::crc::crc16_A ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-A with poly = 0x1021 init = 0xC6C6 refIn = true refOut = true xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_ARC()

static uint16_t qlibs::crc::crc16_ARC ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/ARC with poly = 0x8005 init = 0x0000 refIn = true refOut = true xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_AUG_CCITT()

static uint16_t qlibs::crc::crc16_AUG_CCITT ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/AUG-CCITT with poly = 0x1021 init = 0x1D0F refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_BUYPASS()

static uint16_t qlibs::crc::crc16_BUYPASS ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/BUYPASS with poly = 0x8005 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_CCITT_FALSE()

static uint16_t qlibs::crc::crc16_CCITT_FALSE ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/CCITT-FALSE with poly = 0x1021 init = 0xFFFF refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_CDMA2000()

static uint16_t qlibs::crc::crc16_CDMA2000 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/CDMA2000 with poly = 0xC867 init = 0xFFFF refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_DDS_110()

static uint16_t qlibs::crc::crc16_DDS_110 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/DDS-110 with poly = 0x8005 init = 0x800D refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_DECT_R()

static uint16_t qlibs::crc::crc16_DECT_R ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/DECT-R with poly = 0x0589 init = 0x0000 refIn = false refOut = false xorOut= 0x0001.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_DECT_X()

static uint16_t qlibs::crc::crc16_DECT_X ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/DECT-X with poly = 0x0589 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_DNP()

static uint16_t qlibs::crc::crc16_DNP ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/DNP with poly = 0x3D98 init = 0x0000 refIn = true refOut = true xorOut= 0xFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_EN_13757()

static uint16_t qlibs::crc::crc16_EN_13757 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/EN-13757 with poly = 0x3D65 init = 0x0000 refIn = false refOut = false xorOut= 0xFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_GENIBUS()

static uint16_t qlibs::crc::crc16_GENIBUS ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/GENIBUS with poly = 0x1021 init = 0xFFFF refIn = false refOut = false xorOut= 0xFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_KERMIT()

static uint16_t qlibs::crc::crc16_KERMIT ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/KERMIT with poly = 0x1021 init = 0x0000 refIn = true refOut = true xorOut= 0x000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_MAXIM()

static uint16_t qlibs::crc::crc16_MAXIM ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/MAXIM with poly = 0x8005 init = 0x0000 refIn = true refOut = true xorOut= 0xFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_MCRF4XX()

static uint16_t qlibs::crc::crc16_MCRF4XX ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/MCRF4XX with poly = 0x1021 init = 0xFFFF refIn = true refOut = true xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_MODBUS()

static uint16_t qlibs::crc::crc16_MODBUS ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/MODBUS with poly = 0x8005 init = 0xFFFF refIn = true refOut = true xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_RIELLO()

static uint16_t qlibs::crc::crc16_RIELLO ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/RIELLO with poly = 0x1021 init = 0xB2AA refIn = true refOut = true xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_T10_DIF()

static uint16_t qlibs::crc::crc16_T10_DIF ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/DECT-X with poly = 0x8bb7 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_TELEDISK()

static uint16_t qlibs::crc::crc16_TELEDISK ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/TELEDISK with poly = 0xA097 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_TMS37157()

static uint16_t qlibs::crc::crc16_TMS37157 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/TMS37157 with poly = 0x1021 init = 0x89EC refIn = true refOut = true xorOut= 0x000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_USB()

static uint16_t qlibs::crc::crc16_USB ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/USB with poly = 0x8005 init = 0xFFFF refIn = true refOut = true xorOut= 0xFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_X_25()

static uint16_t qlibs::crc::crc16_X_25 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/X-25 with poly = 0x1021 init = 0xFFFF refIn = true refOut = true xorOut= 0xFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc16_XMODEM()

static uint16_t qlibs::crc::crc16_XMODEM ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-16/XMODEM with poly = 0x1021 init = 0x0000 refIn = false refOut = false xorOut= 0x0000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32()

static uint32_t qlibs::crc::crc32 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32 with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0xFFFFFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_BZIP2()

static uint32_t qlibs::crc::crc32_BZIP2 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32/BZIP2 with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = false refOut = false xorOut= 0xFFFFFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_C()

static uint32_t qlibs::crc::crc32_C ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32C with poly = 0x1EDC6F41 init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0xFFFFFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_D()

static uint32_t qlibs::crc::crc32_D ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32D with poly = 0xA833982B init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0xFFFFFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_JAMCRC()

static uint32_t qlibs::crc::crc32_JAMCRC ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32/JAMCRC with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = true refOut = true xorOut= 0x00000000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_MPEG2()

static uint32_t qlibs::crc::crc32_MPEG2 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32/MPEG2 with poly = 0x04C11DB7 init = 0xFFFFFFFF refIn = false refOut = false xorOut= 0x00000000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_POSIX()

static uint32_t qlibs::crc::crc32_POSIX ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32/POSIX with poly = 0x04C11DB7 init = 0x00000000 refIn = false refOut = false xorOut= 0xFFFFFFFF.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_Q()

static uint32_t qlibs::crc::crc32_Q ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32Q with poly = 0x814141AB init = 0x00000000 refIn = false refOut = false xorOut= 0x00000000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc32_XFER()

static uint32_t qlibs::crc::crc32_XFER ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-32/XFER with poly = 0x000000AF init = 0x00000000 refIn = false refOut = false xorOut= 0x00000000.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8()

static uint8_t qlibs::crc::crc8 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8 with poly = 0x07 init = 0x00 refIn = false refOut = false xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_CDMA2000()

static uint8_t qlibs::crc::crc8_CDMA2000 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/CDMA2000 with poly = 0x9B init = 0xFF refIn = false refOut = false xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_DARC()

static uint8_t qlibs::crc::crc8_DARC ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/DARC with poly = 0x39 init = 0x00 refIn = true refOut = true xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_DVS_S2()

static uint8_t qlibs::crc::crc8_DVS_S2 ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/DVS-S2 with poly = 0xD5 init = 0x00 refIn = false refOut = false xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_EBU()

static uint8_t qlibs::crc::crc8_EBU ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/EBU with poly = 0x1D init = 0xFF refIn = true refOut = true xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_I_CODE()

static uint8_t qlibs::crc::crc8_I_CODE ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/I-CODE with poly = 0x1D init = 0xFD refIn = false refOut = false xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_ITU()

static uint8_t qlibs::crc::crc8_ITU ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/ITU with poly = 0x07 init = 0x00 refIn = false refOut = false xorOut= 0x55.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_MAXIM()

static uint8_t qlibs::crc::crc8_MAXIM ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/MAXIM with poly = 0x31 init = 0x00 refIn = true refOut = true xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_ROHC()

static uint8_t qlibs::crc::crc8_ROHC ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/ROHC with poly = 0x07 init = 0xFF refIn = true refOut = true xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ crc8_WCDMA()

static uint8_t qlibs::crc::crc8_WCDMA ( const void *const pData,
const size_t length )
inlinestaticnoexcept

CRC-8/WCDMA with poly = 0x9B init = 0x00 refIn = true refOut = true xorOut= 0x00.

Parameters
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
Returns
The CRC value for data.

◆ generic()

uint32_t crc::generic ( crcMode mode,
const void *const pData,
const size_t length,
uint32_t poly,
const uint32_t init = 0U,
bool refIn = false,
bool refOut = false,
uint32_t xorOut = 0U )
staticnoexcept

Calculates in one pass the common width bit CRC value for a block of data that is passed to the function together with a parameter indicating the length.

Parameters
[in]modeTo select the CRC calculation mode. Only the following values are supported: CRC8, CRC16 and CRC32.
[in]pDataA pointer to the block of data.
[in]lengthThe number of bytes in data.
[in]polyCRC polynomial value.
[in]initCRC initial value.
[in]refInIf true, the input data is reflected before processing.
[in]refOutIf true, the CRC result is reflected before output.
[in]xorOutThe final XOR value.
Returns
The CRC value for data.