crc32c(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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), or 0 if 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