thin-provisioning-tools/checksum.h

25 lines
411 B
C
Raw Normal View History

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