gwenhywfar 5.12.0
hashalgo.h
Go to the documentation of this file.
1/***************************************************************************
2 $RCSfile$
3 -------------------
4 cvs : $Id: crypttoken.h 1113 2007-01-10 09:14:16Z martin $
5 begin : Wed Mar 16 2005
6 copyright : (C) 2005 by Martin Preuss
7 email : martin@libchipcard.de
8
9 ***************************************************************************
10 * Please see toplevel file COPYING for license details *
11 ***************************************************************************/
12
13
14#ifndef GWEN_CRYPT_HASHALGO_H
15#define GWEN_CRYPT_HASHALGO_H
16
17
18#include <gwenhywfar/list2.h>
19
20
22
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29 GWEN_Crypt_HashAlgo,
31
32#ifdef __cplusplus
33}
34#endif
35
36
37typedef enum {
38 GWEN_Crypt_HashAlgoId_Unknown=-1,
39 GWEN_Crypt_HashAlgoId_None=0,
40 GWEN_Crypt_HashAlgoId_Any,
42 GWEN_Crypt_HashAlgoId_Sha1,
44 GWEN_Crypt_HashAlgoId_Rmd160,
46 GWEN_Crypt_HashAlgoId_Md5,
47 GWEN_Crypt_HashAlgoId_Sha256,
49
50
51#include <gwenhywfar/db.h>
52
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
60
61
68
73 const uint8_t *pv,
74 uint32_t lv);
75
76#ifdef __cplusplus
77}
78#endif
79
80
81#endif
82
struct GWEN_DB_NODE GWEN_DB_NODE
Definition db.h:228
#define GWENHYWFAR_API
GWENHYWFAR_API GWEN_CRYPT_HASHALGOID GWEN_Crypt_HashAlgoId_fromString(const char *s)
GWENHYWFAR_API uint32_t GWEN_Crypt_HashAlgo_GetInitVectorLen(const GWEN_CRYPT_HASHALGO *a)
GWENHYWFAR_API GWEN_CRYPT_HASHALGO * GWEN_Crypt_HashAlgo_fromDb(GWEN_DB_NODE *db)
GWENHYWFAR_API void GWEN_Crypt_HashAlgo_free(GWEN_CRYPT_HASHALGO *a)
GWENHYWFAR_API GWEN_CRYPT_HASHALGOID GWEN_Crypt_HashAlgo_GetId(const GWEN_CRYPT_HASHALGO *a)
struct GWEN_CRYPT_HASHALGO GWEN_CRYPT_HASHALGO
Definition hashalgo.h:21
GWEN_CRYPT_HASHALGOID
Definition hashalgo.h:48
GWENHYWFAR_API int GWEN_Crypt_HashAlgo_toDb(const GWEN_CRYPT_HASHALGO *a, GWEN_DB_NODE *db)
GWENHYWFAR_API GWEN_CRYPT_HASHALGO * GWEN_Crypt_HashAlgo_dup(const GWEN_CRYPT_HASHALGO *a)
GWENHYWFAR_API int GWEN_Crypt_HashAlgo_SetInitVector(GWEN_CRYPT_HASHALGO *a, const uint8_t *pv, uint32_t lv)
GWENHYWFAR_API uint8_t * GWEN_Crypt_HashAlgo_GetInitVectorPtr(const GWEN_CRYPT_HASHALGO *a)
GWENHYWFAR_API GWEN_CRYPT_HASHALGO * GWEN_Crypt_HashAlgo_new(GWEN_CRYPT_HASHALGOID id)
GWENHYWFAR_API const char * GWEN_Crypt_HashAlgoId_toString(GWEN_CRYPT_HASHALGOID a)
GWENHYWFAR_API void GWEN_Crypt_HashAlgo_Attach(GWEN_CRYPT_HASHALGO *a)
This file contains some macros concerning lists.
#define GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list2.h:56