createrepo_c library  0.2.1
C library for metadata manipulation
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
checksum.h
1 /* createrepo_c - Library of routines for manipulation with repodata
2  * Copyright (C) 2013 Tomas Mlcoch
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17  * USA.
18  */
19 
20 #ifndef __C_CREATEREPOLIB_CHECKSUM_H__
21 #define __C_CREATEREPOLIB_CHECKSUM_H__
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
34 typedef struct _cr_ChecksumCtx cr_ChecksumCtx;
35 
41 typedef enum {
43 // CR_CHECKSUM_MD2, /*!< MD2 checksum */
53 
59 const char *cr_checksum_name_str(cr_ChecksumType type);
60 
65 cr_ChecksumType cr_checksum_type(const char *name);
66 
74 char *cr_checksum_file(const char *filename,
75  cr_ChecksumType type,
76  GError **err);
77 
84 
93  const void *buf,
94  size_t len,
95  GError **err);
96 
103 char *cr_checksum_final(cr_ChecksumCtx *ctx, GError **err);
104 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* __C_CREATEREPOLIB_XML_PARSER_H__ */