crc32.c
April 3, 2026 ยท View on GitHub
Purpose
Two CRC32 helpers with different initialization/finalization rules.
API Reference
uint32_t XCRC32_Compute(const uint8_t *pInput, size_t nLength)
- Arguments:
pInput: source bytes.nLength: byte count.
- Does:
- computes CRC32 starting from
0.
- computes CRC32 starting from
- Returns:
- computed CRC value.
0whenpInput == NULLornLength == 0.
uint32_t XCRC32_ComputeB(const uint8_t *pInput, size_t nLength)
- Arguments:
- same shape as
XCRC32_Compute.
- same shape as
- Does:
- computes CRC32 starting from
0xFFFFFFFFand returns bitwise complement at the end.
- computes CRC32 starting from
- Returns:
- computed CRC value.
0whenpInput == NULLornLength == 0.