gwenhywfar 5.11.1beta
sar.h
Go to the documentation of this file.
1/***************************************************************************
2 begin : Wed Jun 22 2011
3 copyright : (C) 2011 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21 * MA 02111-1307 USA *
22 * *
23 ***************************************************************************/
24
25
26#ifndef GWEN_SAR_H
27#define GWEN_SAR_H
28
29
32#include <gwenhywfar/cryptmgr.h>
33#include <gwenhywfar/cryptkey.h>
34
35
36
37typedef struct GWEN_SAR GWEN_SAR;
38
41
44
47
48
49
51int GWEN_Sar_CreateArchive(GWEN_SAR *sr, const char *aname);
52
54int GWEN_Sar_OpenArchive(GWEN_SAR *sr, const char *aname,
56 uint32_t acc);
57
59int GWEN_Sar_CloseArchive(GWEN_SAR *sr, int abandon);
60
61
63int GWEN_Sar_AddFile(GWEN_SAR *sr, const char *fname);
64
65
68
69
72
75
76
79
82
83
84
85
87int GWEN_Sar_UnpackArchive(const char *inFile, const char *where);
88
90int GWEN_Sar_CheckArchive(const char *inFile);
91
92
94int GWEN_Sar_VerifyArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key);
95
97int GWEN_Sar_SignArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key);
98
99
100
101#endif
102
103
104
105
106
struct GWEN_CRYPT_KEY GWEN_CRYPT_KEY
Definition cryptkey.h:26
struct GWEN_CRYPTMGR GWEN_CRYPTMGR
Definition cryptmgr.h:64
struct GWEN_SAR_FILEHEADER GWEN_SAR_FILEHEADER
#define GWENHYWFAR_API
GWENHYWFAR_API int GWEN_Sar_Verify(GWEN_SAR *sr, GWEN_CRYPTMGR *cm)
GWENHYWFAR_API int GWEN_Sar_CloseArchive(GWEN_SAR *sr, int abandon)
GWENHYWFAR_API int GWEN_Sar_CheckFile(GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh)
GWENHYWFAR_API int GWEN_Sar_CheckArchive(const char *inFile)
GWENHYWFAR_API int GWEN_Sar_AddFile(GWEN_SAR *sr, const char *fname)
GWENHYWFAR_API int GWEN_Sar_ExtractFile(GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh)
GWENHYWFAR_API const GWEN_SAR_FILEHEADER_LIST * GWEN_Sar_GetHeaders(GWEN_SAR *sr)
GWENHYWFAR_API int GWEN_Sar_OpenArchive(GWEN_SAR *sr, const char *aname, GWEN_SYNCIO_FILE_CREATIONMODE cm, uint32_t acc)
GWENHYWFAR_API void GWEN_Sar_Attach(GWEN_SAR *sr)
GWENHYWFAR_API int GWEN_Sar_Sign(GWEN_SAR *sr, GWEN_CRYPTMGR *cm)
struct GWEN_SAR GWEN_SAR
Definition sar.h:37
GWENHYWFAR_API int GWEN_Sar_VerifyArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key)
GWENHYWFAR_API int GWEN_Sar_SignArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key)
GWENHYWFAR_API void GWEN_Sar_free(GWEN_SAR *sr)
GWENHYWFAR_API GWEN_SAR * GWEN_Sar_new(void)
GWENHYWFAR_API int GWEN_Sar_UnpackArchive(const char *inFile, const char *where)
GWENHYWFAR_API int GWEN_Sar_CreateArchive(GWEN_SAR *sr, const char *aname)
GWEN_SYNCIO_FILE_CREATIONMODE
Definition syncio_file.h:36