summaryrefslogtreecommitdiff
path: root/src/key-value-store/crc32.h
diff options
context:
space:
mode:
authorDisch, Simon <Simon.Disch@xse.de>2014-09-04 15:24:56 +0200
committerDisch, Simon <Simon.Disch@xse.de>2014-09-04 15:24:56 +0200
commite0d795f0ee22040ec97ee27f80218250831905be (patch)
treec00d37f988bcbdfe63a2c35c7621dd8cbb757008 /src/key-value-store/crc32.h
parentbbe6881bf7feac78d848910aed8dd6d0bd52044c (diff)
downloadpersistence-common-object-e0d795f0ee22040ec97ee27f80218250831905be.tar.gz
initial commit of key-value-store
Diffstat (limited to 'src/key-value-store/crc32.h')
-rw-r--r--src/key-value-store/crc32.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/key-value-store/crc32.h b/src/key-value-store/crc32.h
new file mode 100644
index 0000000..13ffa4c
--- /dev/null
+++ b/src/key-value-store/crc32.h
@@ -0,0 +1,43 @@
+#ifndef CRC32_H
+#define CRC32_H
+
+/******************************************************************************
+ * Project Persistence key value store
+ * (c) copyright 2014
+ * Company XS Embedded GmbH
+ *****************************************************************************/
+/******************************************************************************
+ * Copyright
+ *
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
+ * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+******************************************************************************/
+ /**
+ * @file crc32.h
+ * @ingroup Persistence key value store
+ * @author Simon Disch
+ * @brief Header of crc32 checksum generation
+ * @see
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define PERS_COM_CRC32_INTERFACE_VERSION (0x01000000U)
+#define CHKSUMBUFSIZE 64
+
+#include <string.h>
+#include <stdio.h>
+
+unsigned int pcoCrc32(unsigned int crc, const unsigned char *buf, size_t theSize);
+int pcoCalcCrc32Csum(int fd, int startOffset);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CRC32_H */