X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcrc%2Fcrc.h;fp=ccan%2Fcrc%2Fcrc.h;h=16994fc397597be61e550b755647734e34fd4ee4;hp=0000000000000000000000000000000000000000;hb=96b6d6f132aeec31adc0dfd0836f67e052694ac7;hpb=7eb00644b848b551b2db5d9de40893e488c2790d diff --git a/ccan/crc/crc.h b/ccan/crc/crc.h new file mode 100644 index 00000000..16994fc3 --- /dev/null +++ b/ccan/crc/crc.h @@ -0,0 +1,15 @@ +#ifndef CCAN_CRC_H +#define CCAN_CRC_H +#include +#include + +/** + * crc32 - 32 bit crc of string of bytes + * @buf: pointer to bytes + * @size: length of buffer + * + * 32 bit CRC checksum using polynomial + * 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. + */ +uint32_t crc32(const void *buf, size_t size); +#endif /* CCAN_CRC_H */