]> git.ozlabs.org Git - ccan/blob - ccan/crc/crc.h
CRC module.
[ccan] / ccan / crc / crc.h
1 #ifndef CCAN_CRC_H
2 #define CCAN_CRC_H
3 #include <stdint.h>
4 #include <stdlib.h>
5
6 /**
7  * crc32 - 32 bit crc of string of bytes
8  * @buf: pointer to bytes
9  * @size: length of buffer
10  *
11  * 32 bit CRC checksum using polynomial
12  * 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.
13  */
14 uint32_t crc32(const void *buf, size_t size);
15 #endif /* CCAN_CRC_H */