stasis-aries-wal/stasis/util/crc32.h

27 lines
559 B
C
Raw Normal View History

2010-01-19 01:47:13 +00:00
#ifndef STASIS_CRC32_H
#define STASIS_CRC32_H
2010-10-03 15:40:53 +00:00
/* This CRC code was taken from: http://www.axlradius.com/freestuff/crc2.c
(It is presumably in the public domain. Other files under /freestuff/ are...)
( Added a #include for this .h file. Otherwise, crc32 is a verbatim copy of the file from the internet.)
*/
/**
Usage:
unsigned int crc = -1L
crc = crc32(buffer, length, crc)
*/
2010-01-19 01:47:13 +00:00
#include <stasis/common.h>
2010-10-03 15:40:53 +00:00
BEGIN_C_DECLS
2010-01-19 01:47:13 +00:00
uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc);
2010-10-03 15:40:53 +00:00
END_C_DECLS
2010-01-19 01:47:13 +00:00
#endif // STASIS_CRC32_H