1 /* Licensed under GPLv2+ - see LICENSE file for details */
7 /* Note: the crc32c function has been *fixed* (it gave wrong results!) and
8 * moved to the ccan/crc32c module. You probably want that if you're
9 * just after a "good" crc function. */
12 * crc32_ieee - IEEE 802.3 32 bit crc of string of bytes
13 * @start_crc: the initial crc (usually 0)
14 * @buf: pointer to bytes
15 * @size: length of buffer
17 * 32 bit CRC checksum using polynomial
18 * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0.
20 * See crc32c() for details.
22 uint32_t crc32_ieee(uint32_t start_crc, const void *buf, size_t size);
25 * crc32_ieee_table - Get the IEEE 802.3 CRC table
27 * See crc32c_table() for details.
29 const uint32_t *crc32_ieee_table(void);
32 * crc64_iso - ISO 3309
33 * @start_crc: the initial crc (usually 0)
34 * @buf: pointer to bytes
35 * @size: length of buffer
37 * 64 bit CRC checksum using polynomial
38 * X^64 + X^4 + X^3 + X^1 + X^0
40 * See crc32c() for details.
42 uint64_t crc64_iso(uint64_t start_crc, const void *buf, size_t size);
45 * crc64_iso_table - Get the ISO 3309 CRC table
47 * See crc32c_table() for details.
49 const uint64_t *crc64_iso_table(void);
51 #endif /* CCAN_CRC_H */