2 * Copyright (c) 2007-2012, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
8 #ifndef LIBSOLV_CHKSUM_H
9 #define LIBSOLV_CHKSUM_H
13 void *solv_chksum_create(Id type);
14 void *solv_chksum_create_from_bin(Id type, const unsigned char *buf);
15 void solv_chksum_add(void *handle, const void *data, int len);
16 Id solv_chksum_get_type(void *handle);
17 int solv_chksum_isfinished(void *handle);
18 const unsigned char *solv_chksum_get(void *handle, int *lenp);
19 void *solv_chksum_free(void *handle, unsigned char *cp);
20 const char *solv_chksum_type2str(Id type);
21 Id solv_chksum_str2type(const char *str);
23 static inline int solv_chksum_len(Id type)
27 case REPOKEY_TYPE_MD5:
29 case REPOKEY_TYPE_SHA1:
31 case REPOKEY_TYPE_SHA256:
38 #endif /* LIBSOLV_CHKSUM_H */