mdigest.h
Go to the documentation of this file.
/***************************************************************************
$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
int GWEN_MDigest_Digest(GWEN_MDIGEST *md,
const uint8_t *srcBuf, unsigned int srcLen,
uint8_t *dstBuf, unsigned int dstLen);
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);
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);
GWENHYWFAR_API
int GWEN_MDigest_CheckFileTree(GWEN_MDIGEST *md,
const char *folder,
const char *checksumFile,
int strictCheck,
uint32_t pid);
#ifdef __cplusplus
}
#endif
#endif
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
GWEN_CRYPT_HASHALGOID
GWEN_CRYPT_HASHALGOID
Definition hashalgo.h:48
list1.h
GWEN_LIST_FUNCTION_LIB_DEFS
#define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list1.h:349
list2.h
This file contains some macros concerning lists.
GWEN_LIST2_FUNCTION_LIB_DEFS
#define GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list2.h:56
GWEN_MDigest_Md5_new
GWENHYWFAR_API GWEN_MDIGEST * GWEN_MDigest_Md5_new(void)
GWEN_MDigest_CheckFileTree
GWENHYWFAR_API int GWEN_MDigest_CheckFileTree(GWEN_MDIGEST *md, const char *folder, const char *checksumFile, int strictCheck, uint32_t pid)
GWEN_MDigest_Begin
GWENHYWFAR_API int GWEN_MDigest_Begin(GWEN_MDIGEST *md)
GWEN_MDigest_GetDigestPtr
GWENHYWFAR_API uint8_t * GWEN_MDigest_GetDigestPtr(GWEN_MDIGEST *md)
GWEN_MDigest_Rmd160_new
GWENHYWFAR_API GWEN_MDIGEST * GWEN_MDigest_Rmd160_new(void)
GWEN_MDigest_GetHashAlgoId
GWENHYWFAR_API GWEN_CRYPT_HASHALGOID GWEN_MDigest_GetHashAlgoId(const GWEN_MDIGEST *md)
GWEN_MDigest_HashFileTree
GWENHYWFAR_API int GWEN_MDigest_HashFileTree(GWEN_MDIGEST *md, const char *folder, const char *ignoreFile, GWEN_STRINGLIST *sl)
GWEN_MDigest_End
GWENHYWFAR_API int GWEN_MDigest_End(GWEN_MDIGEST *md)
GWEN_MDigest_Digest
GWENHYWFAR_API int GWEN_MDigest_Digest(GWEN_MDIGEST *md, const uint8_t *srcBuf, unsigned int srcLen, uint8_t *dstBuf, unsigned int dstLen)
GWEN_MDigest_GetDigestSize
GWENHYWFAR_API unsigned int GWEN_MDigest_GetDigestSize(GWEN_MDIGEST *md)
GWEN_MDigest_free
GWENHYWFAR_API void GWEN_MDigest_free(GWEN_MDIGEST *md)
GWEN_MDigest_PBKDF2
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)
GWEN_MDigest_Update
GWENHYWFAR_API int GWEN_MDigest_Update(GWEN_MDIGEST *md, const uint8_t *buf, unsigned int l)
GWEN_MDIGEST
struct GWEN_MDIGEST GWEN_MDIGEST
Definition mdigest.h:25
GWEN_MDigest_Sha256_new
GWENHYWFAR_API GWEN_MDIGEST * GWEN_MDigest_Sha256_new(void)
GWEN_MDigest_Sha1_new
GWENHYWFAR_API GWEN_MDIGEST * GWEN_MDigest_Sha1_new(void)
stringlist.h
GWEN_STRINGLIST
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition stringlist.h:56