add solv_chksum_create_clone to clone a (unfinished) checksum
[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 void *solv_chksum_create(Id type);
18 void *solv_chksum_create_clone(void *handle);
19 void *solv_chksum_create_from_bin(Id type, const unsigned char *buf);
20 void solv_chksum_add(void *handle, const void *data, int len);
21 Id solv_chksum_get_type(void *handle);
22 int solv_chksum_isfinished(void *handle);
23 const unsigned char *solv_chksum_get(void *handle, int *lenp);
24 void *solv_chksum_free(void *handle, unsigned char *cp);
25 const char *solv_chksum_type2str(Id type);
26 Id solv_chksum_str2type(const char *str);
27 int solv_chksum_len(Id type);
28
29 #ifdef __cplusplus
30 }
31 #endif
32
33 #endif /* LIBSOLV_CHKSUM_H */