summaryrefslogtreecommitdiff
path: root/src/key-value-store/crc32.h
blob: 13ffa4ce67796fd2fe3b02c4acc6875d89c22e94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 */