/usr/include/gwenhywfar4/gwenhywfar/mdigest.h is in libgwenhywfar60-dev 4.10.0beta-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | /***************************************************************************
$RCSfile$
-------------------
cvs : $Id: crypttoken.h 1113 2007-01-10 09:14:16Z martin $
begin : Wed Mar 16 2005
copyright : (C) 2005 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef GWENHYWFAR_MDIGEST_H
#define GWENHYWFAR_MDIGEST_H
#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct GWEN_MDIGEST GWEN_MDIGEST;
GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_MDIGEST, GWEN_MDigest, GWENHYWFAR_API)
GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_MDIGEST, GWEN_MDigest, GWENHYWFAR_API)
#include <gwenhywfar/hashalgo.h>
#include <gwenhywfar/stringlist.h>
GWENHYWFAR_API
void GWEN_MDigest_free(GWEN_MDIGEST *md);
GWENHYWFAR_API
GWEN_CRYPT_HASHALGOID GWEN_MDigest_GetHashAlgoId(const GWEN_MDIGEST *md);
GWENHYWFAR_API
uint8_t *GWEN_MDigest_GetDigestPtr(GWEN_MDIGEST *md);
GWENHYWFAR_API
unsigned int GWEN_MDigest_GetDigestSize(GWEN_MDIGEST *md);
GWENHYWFAR_API
int GWEN_MDigest_Begin(GWEN_MDIGEST *md);
GWENHYWFAR_API
int GWEN_MDigest_End(GWEN_MDIGEST *md);
GWENHYWFAR_API
int GWEN_MDigest_Update(GWEN_MDIGEST *md, const uint8_t *buf, unsigned int l);
GWENHYWFAR_API GWEN_MDIGEST *GWEN_MDigest_Md5_new(void);
GWENHYWFAR_API GWEN_MDIGEST *GWEN_MDigest_Rmd160_new(void);
GWENHYWFAR_API GWEN_MDIGEST *GWEN_MDigest_Sha1_new(void);
GWENHYWFAR_API GWEN_MDIGEST *GWEN_MDigest_Sha256_new(void);
/**
* Generate a key from a given password and a salt according to RFC 2898.
*/
GWENHYWFAR_API int GWEN_MDigest_PBKDF2(GWEN_MDIGEST *md,
const char *password,
const uint8_t *pSalt,
uint32_t lSalt,
uint8_t *pKey,
uint32_t lKey,
uint32_t iterations);
GWENHYWFAR_API int GWEN_MDigest_HashFileTree(GWEN_MDIGEST *md,
const char *folder,
const char *ignoreFile,
GWEN_STRINGLIST *sl);
/**
* This function verifies the integrity of a given file hierarchy by comparing
* checksums saved in a given file inside that file tree to the actual checksums
* of the files in the file tree.
* @param md digest algorithm to use (see @ref GWEN_MDigest_Rmd160_new et al)
* @param folder folder to check
* @param checkSumFile name of the file containing the checksums
* @param strictCheck if !=0 then an error will be returned if there are files in the
* tree for which there is no corresponding entry in the checksum file
* @param pid id of the open progress dialog (see @ref GWEN_Gui_ProgressStart)
*/
GWENHYWFAR_API
int GWEN_MDigest_CheckFileTree(GWEN_MDIGEST *md,
const char *folder,
const char *checksumFile,
int strictCheck,
uint32_t pid);
#ifdef __cplusplus
}
#endif
#endif
|