gwenhywfar 5.12.0
sar.h File Reference
#include <gwenhywfar/gwen_sar_fileheader.h>
#include <gwenhywfar/syncio_file.h>
#include <gwenhywfar/cryptmgr.h>
#include <gwenhywfar/cryptkey.h>
Include dependency graph for sar.h:

Go to the source code of this file.

Typedefs

typedef struct GWEN_SAR GWEN_SAR

Functions

GWENHYWFAR_API int GWEN_Sar_AddFile (GWEN_SAR *sr, const char *fname)
GWENHYWFAR_API void GWEN_Sar_Attach (GWEN_SAR *sr)
GWENHYWFAR_API int GWEN_Sar_CheckArchive (const char *inFile)
GWENHYWFAR_API int GWEN_Sar_CheckFile (GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh)
GWENHYWFAR_API int GWEN_Sar_CloseArchive (GWEN_SAR *sr, int abandon)
GWENHYWFAR_API int GWEN_Sar_CreateArchive (GWEN_SAR *sr, const char *aname)
GWENHYWFAR_API int GWEN_Sar_ExtractFile (GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh)
GWENHYWFAR_API void GWEN_Sar_free (GWEN_SAR *sr)
GWENHYWFAR_API const GWEN_SAR_FILEHEADER_LISTGWEN_Sar_GetHeaders (GWEN_SAR *sr)
GWENHYWFAR_API GWEN_SARGWEN_Sar_new (void)
GWENHYWFAR_API int GWEN_Sar_OpenArchive (GWEN_SAR *sr, const char *aname, GWEN_SYNCIO_FILE_CREATIONMODE cm, uint32_t acc)
GWENHYWFAR_API int GWEN_Sar_Sign (GWEN_SAR *sr, GWEN_CRYPTMGR *cm)
GWENHYWFAR_API int GWEN_Sar_SignArchive (const char *inFile, const char *signer, GWEN_CRYPT_KEY *key)
GWENHYWFAR_API int GWEN_Sar_UnpackArchive (const char *inFile, const char *where)
GWENHYWFAR_API int GWEN_Sar_Verify (GWEN_SAR *sr, GWEN_CRYPTMGR *cm)
GWENHYWFAR_API int GWEN_Sar_VerifyArchive (const char *inFile, const char *signer, GWEN_CRYPT_KEY *key)

Typedef Documentation

◆ GWEN_SAR

typedef struct GWEN_SAR GWEN_SAR

Definition at line 37 of file sar.h.

Function Documentation

◆ GWEN_Sar_AddFile()

GWENHYWFAR_API int GWEN_Sar_AddFile ( GWEN_SAR * sr,
const char * fname )

◆ GWEN_Sar_Attach()

GWENHYWFAR_API void GWEN_Sar_Attach ( GWEN_SAR * sr)

Definition at line 64 of file sar.c.

◆ GWEN_Sar_CheckArchive()

◆ GWEN_Sar_CheckFile()

GWENHYWFAR_API int GWEN_Sar_CheckFile ( GWEN_SAR * sr,
const GWEN_SAR_FILEHEADER * fh )

Definition at line 1822 of file sar.c.

References DBG_INFO, GWEN_LOGDOMAIN, and GWEN_Sar_ExtractAndDigestFile().

Referenced by checkArchive(), and GWEN_Sar_CheckArchive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Sar_CloseArchive()

GWENHYWFAR_API int GWEN_Sar_CloseArchive ( GWEN_SAR * sr,
int abandon )

◆ GWEN_Sar_CreateArchive()

◆ GWEN_Sar_ExtractFile()

GWENHYWFAR_API int GWEN_Sar_ExtractFile ( GWEN_SAR * sr,
const GWEN_SAR_FILEHEADER * fh )

Definition at line 1807 of file sar.c.

References DBG_INFO, GWEN_LOGDOMAIN, and GWEN_Sar_ExtractAndDigestFile().

Referenced by extractArchive(), and GWEN_Sar__UnpackArchive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Sar_free()

GWENHYWFAR_API void GWEN_Sar_free ( GWEN_SAR * sr)

Definition at line 73 of file sar.c.

References GWEN_FREE_OBJECT, GWEN_SarFileHeader_List_free(), and GWEN_SyncIo_free().

Referenced by add2Archive(), extractArchive(), GWEN_Sar__UnpackArchive(), GWEN_Sar_CheckArchive(), GWEN_Sar_SignArchive(), GWEN_Sar_VerifyArchive(), signArchive(), and verifyArchive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Sar_GetHeaders()

GWENHYWFAR_API const GWEN_SAR_FILEHEADER_LIST * GWEN_Sar_GetHeaders ( GWEN_SAR * sr)

Definition at line 1837 of file sar.c.

Referenced by checkArchive(), extractArchive(), GWEN_Sar__UnpackArchive(), GWEN_Sar_CheckArchive(), and listArchive().

Here is the caller graph for this function:

◆ GWEN_Sar_new()

GWENHYWFAR_API GWEN_SAR * GWEN_Sar_new ( void )

Definition at line 50 of file sar.c.

References GWEN_NEW_OBJECT, and GWEN_SarFileHeader_List_new().

Referenced by add2Archive(), checkArchive(), createArchive(), extractArchive(), GWEN_Sar__UnpackArchive(), GWEN_Sar_CheckArchive(), GWEN_Sar_SignArchive(), GWEN_Sar_VerifyArchive(), listArchive(), signArchive(), and verifyArchive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Sar_OpenArchive()

GWENHYWFAR_API int GWEN_Sar_OpenArchive ( GWEN_SAR * sr,
const char * aname,
GWEN_SYNCIO_FILE_CREATIONMODE cm,
uint32_t acc )

◆ GWEN_Sar_Sign()

◆ GWEN_Sar_SignArchive()

GWENHYWFAR_API int GWEN_Sar_SignArchive ( const char * inFile,
const char * signer,
GWEN_CRYPT_KEY * key )

◆ GWEN_Sar_UnpackArchive()

GWENHYWFAR_API int GWEN_Sar_UnpackArchive ( const char * inFile,
const char * where )

Definition at line 1922 of file sar.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_IO, GWEN_LOGDOMAIN, GWEN_Sar__UnpackArchive(), and NULL.

Here is the call graph for this function:

◆ GWEN_Sar_Verify()

◆ GWEN_Sar_VerifyArchive()

GWENHYWFAR_API int GWEN_Sar_VerifyArchive ( const char * inFile,
const char * signer,
GWEN_CRYPT_KEY * key )