#include <libkern/crc.h>

libkern/crc.h Kernel.framework

includes: sys/cdefs.h, Kernel/stdint.h
1 function

functioncrc32

uint32_t crc32(uint32_t crc, const void *bufp, size_t len)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu bsd/libkern/crc32.c
Computes the CRC-32 checksum (IEEE 802.3 polynomial 0xedb88320, as used by zlib and POSIX cksum) of the len bytes at bufp, using a byte-at-a-time table lookup. The crc argument is the running checksum from a previous call, permitting incremental computation over discontiguous buffers; pass 0 to start. Pre- and post-inversion of the CRC register is handled internally. Returns the updated checksum.