From e0d795f0ee22040ec97ee27f80218250831905be Mon Sep 17 00:00:00 2001 From: "Disch, Simon" Date: Thu, 4 Sep 2014 15:24:56 +0200 Subject: initial commit of key-value-store --- src/key-value-store/crc32.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/key-value-store/crc32.h (limited to 'src/key-value-store/crc32.h') 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 +#include + +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 */ -- cgit v1.2.1