25 lines
411 B
C
Raw Normal View History

2011-09-12 11:49:42 +01:00
#ifndef CHECKSUM_H
#define CHECKSUM_H
#include <stdint.h>
//----------------------------------------------------------------
namespace base {
2011-09-16 10:06:37 +01:00
class crc32c {
public:
crc32c(uint32_t xor_value);
2011-09-12 11:49:42 +01:00
void append(void const *buffer, unsigned len);
uint32_t get_sum() const;
private:
2011-09-16 10:06:37 +01:00
uint32_t xor_value_;
2011-09-12 11:49:42 +01:00
uint32_t sum_;
};
}
//----------------------------------------------------------------
#endif