crc32c(9)
π crc32c β your fave little checksum bestie π
okay so we're in the kernel API manual, this is crc32c(9), and she is literally the moment. let's get into it β¨
β¨ SYNOPSIS β¨
u32 crc32c (u32 crc , const void *p , size_t len );
that's it. three lil args and you get a u32 back. iconic. π«Ά
πΈ ARGUMENTS πΈ
crcβ the initial CRC value, bestie. you got three moods here:~0(this is the recommended one, no cap), or0if you're starting a brand new CRC computation, or β plot twist β the previous CRC value if you're computing incrementally. incremental girlies rise πpβ pointer to the data buffer. just... the data. the stuff. πlenβ length of data in bytes. yes we count them. all of them. π₯
π¦ DESCRIPTION π¦
so this implements CRC-32C, aka the Castagnoli CRC, and honestly? it's the recommended CRC variant to use in any new applications that want a 32-bit CRC. she's the main character of 32-bit CRCs, fr fr. π
here's the deets, in bullet form because we're organized and also cute:
- Polynomial:
x^32 + x^28 + x^27 + x^26 + x^25 + x^23 + x^22 + x^20 + x^19 + x^18 + x^14 + x^13 + x^11 + x^10 + x^9 + x^8 + x^6 + x^0 - Bit order: Least-significant-bit-first (lsb girlies, we been knew π)
- Polynomial in integer form:
0x82f63b78
β οΈ okay important one: this does not invert the CRC at the beginning or end. the caller is expected to do that if it needs to. and inverting at both ends is recommended β so like, do it. be that girl. π
π CONTEXT π
Any context. any vibe. she's flexible like that. β¨
β RETURN β
The new CRC value. that's the whole thing. that's what you get. π
π§ SEE ALSO π§
Kernel file ./include/linux/crc32.h β plus her two siblings, crc32_le(9) and crc32_be(9). family content fr π
okay that's the whole page and yes it ate π
this little gem lives in ./include/linux and is dated October 2026, tagging along with crc32c(9) β go forth and checksum, bestie, mwah ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms