hashalgo.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: crypttoken.h 1113 2007-01-10 09:14:16Z martin $
00005     begin       : Wed Mar 16 2005
00006     copyright   : (C) 2005 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *          Please see toplevel file COPYING for license details           *
00011  ***************************************************************************/
00012 
00013 
00014 #ifndef GWEN_CRYPT_HASHALGO_H
00015 #define GWEN_CRYPT_HASHALGO_H
00016 
00017 
00018 #include <gwenhywfar/list2.h>
00019 
00020 
00021 typedef struct GWEN_CRYPT_HASHALGO GWEN_CRYPT_HASHALGO;
00022 
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_CRYPT_HASHALGO,
00029                              GWEN_Crypt_HashAlgo,
00030                              GWENHYWFAR_API)
00031 
00032 #ifdef __cplusplus
00033 }
00034 #endif
00035 
00036 
00037 typedef enum {
00038   GWEN_Crypt_HashAlgoId_Unknown=-1,
00039   GWEN_Crypt_HashAlgoId_None=0,
00040   GWEN_Crypt_HashAlgoId_Any,
00042   GWEN_Crypt_HashAlgoId_Sha1,
00044   GWEN_Crypt_HashAlgoId_Rmd160,
00046   GWEN_Crypt_HashAlgoId_Md5,
00047 } GWEN_CRYPT_HASHALGOID;
00048 
00049 
00050 #include <gwenhywfar/db.h>
00051 
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00057 GWENHYWFAR_API GWEN_CRYPT_HASHALGOID GWEN_Crypt_HashAlgoId_fromString(const char *s);
00058 GWENHYWFAR_API const char *GWEN_Crypt_HashAlgoId_toString(GWEN_CRYPT_HASHALGOID a);
00059 
00060 
00061 GWENHYWFAR_API GWEN_CRYPT_HASHALGO *GWEN_Crypt_HashAlgo_new(GWEN_CRYPT_HASHALGOID id);
00062 GWENHYWFAR_API GWEN_CRYPT_HASHALGO *GWEN_Crypt_HashAlgo_dup(const GWEN_CRYPT_HASHALGO *a);
00063 GWENHYWFAR_API GWEN_CRYPT_HASHALGO *GWEN_Crypt_HashAlgo_fromDb(GWEN_DB_NODE *db);
00064 GWENHYWFAR_API int GWEN_Crypt_HashAlgo_toDb(const GWEN_CRYPT_HASHALGO *a, GWEN_DB_NODE *db);
00065 GWENHYWFAR_API void GWEN_Crypt_HashAlgo_Attach(GWEN_CRYPT_HASHALGO *a);
00066 GWENHYWFAR_API void GWEN_Crypt_HashAlgo_free(GWEN_CRYPT_HASHALGO *a);
00067 
00068 GWENHYWFAR_API GWEN_CRYPT_HASHALGOID GWEN_Crypt_HashAlgo_GetId(const GWEN_CRYPT_HASHALGO *a);
00069 GWENHYWFAR_API uint8_t *GWEN_Crypt_HashAlgo_GetInitVectorPtr(const GWEN_CRYPT_HASHALGO *a);
00070 GWENHYWFAR_API uint32_t GWEN_Crypt_HashAlgo_GetInitVectorLen(const GWEN_CRYPT_HASHALGO *a);
00071 GWENHYWFAR_API int GWEN_Crypt_HashAlgo_SetInitVector(GWEN_CRYPT_HASHALGO *a,
00072                                                      const uint8_t *pv,
00073                                                      uint32_t lv);
00074 
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078 
00079 
00080 #endif
00081 

Generated on Wed Sep 3 15:21:58 2008 for gwenhywfar by  doxygen 1.5.6