Fix build error about binding python 2.7 path
[platform/upstream/libsolv.git] / src / chksum.h
1 /*
2  * Copyright (c) 2007-2012, Novell Inc.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 #ifndef LIBSOLV_CHKSUM_H
9 #define LIBSOLV_CHKSUM_H
10
11 #include "pool.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 struct s_Chksum;
18 typedef struct s_Chksum Chksum;
19
20 Chksum *solv_chksum_create(Id type);
21 Chksum *solv_chksum_create_clone(Chksum *chk);
22 Chksum *solv_chksum_create_from_bin(Id type, const unsigned char *buf);
23 void solv_chksum_add(Chksum *chk, const void *data, int len);
24 Id solv_chksum_get_type(Chksum *chk);
25 int solv_chksum_isfinished(Chksum *chk);
26 const unsigned char *solv_chksum_get(Chksum *chk, int *lenp);
27 void *solv_chksum_free(Chksum *chk, unsigned char *cp);
28 const char *solv_chksum_type2str(Id type);
29 Id solv_chksum_str2type(const char *str);
30 int solv_chksum_len(Id type);
31 int solv_chksum_cmp(Chksum *chk, Chksum *chk2);
32
33 #ifdef LIBSOLV_INTERNAL
34
35 #define case_CHKSUM_TYPES \
36     case REPOKEY_TYPE_MD5: \
37     case REPOKEY_TYPE_SHA1: \
38     case REPOKEY_TYPE_SHA224: \
39     case REPOKEY_TYPE_SHA256: \
40     case REPOKEY_TYPE_SHA384: \
41     case REPOKEY_TYPE_SHA512
42
43 #endif
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif /* LIBSOLV_CHKSUM_H */