createrepo_c library
0.2.1
C library for metadata manipulation
Main Page
Modules
Data Structures
Files
File List
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
{
42
CR_CHECKSUM_UNKNOWN
,
43
// CR_CHECKSUM_MD2, /*!< MD2 checksum */
44
CR_CHECKSUM_MD5
,
45
CR_CHECKSUM_SHA
,
46
CR_CHECKSUM_SHA1
,
47
CR_CHECKSUM_SHA224
,
48
CR_CHECKSUM_SHA256
,
49
CR_CHECKSUM_SHA384
,
50
CR_CHECKSUM_SHA512
,
51
CR_CHECKSUM_SENTINEL
,
52
}
cr_ChecksumType
;
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
83
cr_ChecksumCtx
*
cr_checksum_new
(
cr_ChecksumType
type, GError **err);
84
92
int
cr_checksum_update
(
cr_ChecksumCtx
*ctx,
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__ */
src
checksum.h
Generated on Wed Aug 14 2013 09:00:21 for createrepo_c library by
1.8.4