cryptmgr_be.h
Go to the documentation of this file.
/***************************************************************************
begin : Mon Dec 01 2008
copyright : (C) 2008 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef GWEN_CRYPTMGR_CRYPTMGR_BE_H
#define GWEN_CRYPTMGR_CRYPTMGR_BE_H
#include <gwenhywfar/cryptmgr.h>
#include <gwenhywfar/inherit.h>
#ifdef __cplusplus
extern "C" {
#endif
GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_CRYPTMGR, GWENHYWFAR_API)
typedef GWENHYWFAR_CB int (*GWEN_CRYPTMGR_SIGNDATA_FN)(GWEN_CRYPTMGR *cm,
const uint8_t *pData, uint32_t lData,
GWEN_BUFFER *dbuf);
typedef GWENHYWFAR_CB int (*GWEN_CRYPTMGR_ENCRYPTKEY_FN)(GWEN_CRYPTMGR *cm,
const uint8_t *pData, uint32_t lData,
GWEN_BUFFER *dbuf);
typedef GWENHYWFAR_CB int (*GWEN_CRYPTMGR_VERIFYDATA_FN)(GWEN_CRYPTMGR *cm,
const uint8_t *pData, uint32_t lData,
const uint8_t *pSignature, uint32_t lSignature);
typedef GWENHYWFAR_CB int (*GWEN_CRYPTMGR_DECRYPTKEY_FN)(GWEN_CRYPTMGR *cm,
const uint8_t *pData, uint32_t lData,
GWEN_BUFFER *dbuf);
GWENHYWFAR_API
GWEN_CRYPTMGR *GWEN_CryptMgr_new(void);
GWENHYWFAR_API
void GWEN_CryptMgr_SetLocalKeyName(GWEN_CRYPTMGR *cm, const char *s);
GWENHYWFAR_API
void GWEN_CryptMgr_SetLocalKeyNumber(GWEN_CRYPTMGR *cm, int i);
GWENHYWFAR_API
void GWEN_CryptMgr_SetLocalKeyVersion(GWEN_CRYPTMGR *cm, int i);
GWENHYWFAR_API
void GWEN_CryptMgr_SetPeerKeyName(GWEN_CRYPTMGR *cm, const char *s);
GWENHYWFAR_API
void GWEN_CryptMgr_SetPeerKeyNumber(GWEN_CRYPTMGR *cm, int i);
GWENHYWFAR_API
void GWEN_CryptMgr_SetPeerKeyVersion(GWEN_CRYPTMGR *cm, int i);
GWENHYWFAR_API
int GWEN_CryptMgr_SignData(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf);
GWENHYWFAR_API
int GWEN_CryptMgr_EncryptKey(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf);
GWENHYWFAR_API
int GWEN_CryptMgr_VerifyData(GWEN_CRYPTMGR *cm,
const uint8_t *pData, uint32_t lData,
const uint8_t *pSignature, uint32_t lSignature);
GWENHYWFAR_API
int GWEN_CryptMgr_DecryptKey(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf);
GWENHYWFAR_API
GWEN_CRYPTMGR_SIGNDATA_FN GWEN_CryptMgr_SetSignDataFn(GWEN_CRYPTMGR *cm,
GWEN_CRYPTMGR_SIGNDATA_FN f);
GWENHYWFAR_API
GWEN_CRYPTMGR_VERIFYDATA_FN GWEN_CryptMgr_SetVerifyDataFn(GWEN_CRYPTMGR *cm,
GWEN_CRYPTMGR_VERIFYDATA_FN f);
GWENHYWFAR_API
GWEN_CRYPTMGR_ENCRYPTKEY_FN
GWEN_CryptMgr_SetEncryptKeyFn(GWEN_CRYPTMGR *cm,
GWEN_CRYPTMGR_ENCRYPTKEY_FN f);
GWENHYWFAR_API
GWEN_CRYPTMGR_DECRYPTKEY_FN GWEN_CryptMgr_SetDecryptKeyFn(GWEN_CRYPTMGR *cm,
GWEN_CRYPTMGR_DECRYPTKEY_FN f);
#ifdef __cplusplus
}
#endif
#endif
cryptmgr.h
GWEN_CRYPTMGR
struct GWEN_CRYPTMGR GWEN_CRYPTMGR
Definition cryptmgr.h:64
GWEN_CryptMgr_new
GWENHYWFAR_API GWEN_CRYPTMGR * GWEN_CryptMgr_new(void)
GWEN_CryptMgr_SignData
GWENHYWFAR_API int GWEN_CryptMgr_SignData(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf)
GWEN_CryptMgr_SetLocalKeyName
GWENHYWFAR_API void GWEN_CryptMgr_SetLocalKeyName(GWEN_CRYPTMGR *cm, const char *s)
GWEN_CryptMgr_DecryptKey
GWENHYWFAR_API int GWEN_CryptMgr_DecryptKey(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf)
GWEN_CryptMgr_SetSignDataFn
GWENHYWFAR_API GWEN_CRYPTMGR_SIGNDATA_FN GWEN_CryptMgr_SetSignDataFn(GWEN_CRYPTMGR *cm, GWEN_CRYPTMGR_SIGNDATA_FN f)
GWEN_CRYPTMGR_SIGNDATA_FN
GWENHYWFAR_CB int(* GWEN_CRYPTMGR_SIGNDATA_FN)(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf)
Definition cryptmgr_be.h:25
GWEN_CryptMgr_EncryptKey
GWENHYWFAR_API int GWEN_CryptMgr_EncryptKey(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf)
GWEN_CryptMgr_SetLocalKeyVersion
GWENHYWFAR_API void GWEN_CryptMgr_SetLocalKeyVersion(GWEN_CRYPTMGR *cm, int i)
GWEN_CryptMgr_SetPeerKeyNumber
GWENHYWFAR_API void GWEN_CryptMgr_SetPeerKeyNumber(GWEN_CRYPTMGR *cm, int i)
GWEN_CRYPTMGR_DECRYPTKEY_FN
GWENHYWFAR_CB int(* GWEN_CRYPTMGR_DECRYPTKEY_FN)(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf)
Definition cryptmgr_be.h:35
GWEN_CryptMgr_SetDecryptKeyFn
GWENHYWFAR_API GWEN_CRYPTMGR_DECRYPTKEY_FN GWEN_CryptMgr_SetDecryptKeyFn(GWEN_CRYPTMGR *cm, GWEN_CRYPTMGR_DECRYPTKEY_FN f)
GWEN_CRYPTMGR_VERIFYDATA_FN
GWENHYWFAR_CB int(* GWEN_CRYPTMGR_VERIFYDATA_FN)(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, const uint8_t *pSignature, uint32_t lSignature)
Definition cryptmgr_be.h:32
GWEN_CryptMgr_SetPeerKeyVersion
GWENHYWFAR_API void GWEN_CryptMgr_SetPeerKeyVersion(GWEN_CRYPTMGR *cm, int i)
GWEN_CRYPTMGR_ENCRYPTKEY_FN
GWENHYWFAR_CB int(* GWEN_CRYPTMGR_ENCRYPTKEY_FN)(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf)
Definition cryptmgr_be.h:28
GWEN_CryptMgr_SetVerifyDataFn
GWENHYWFAR_API GWEN_CRYPTMGR_VERIFYDATA_FN GWEN_CryptMgr_SetVerifyDataFn(GWEN_CRYPTMGR *cm, GWEN_CRYPTMGR_VERIFYDATA_FN f)
GWEN_CryptMgr_SetPeerKeyName
GWENHYWFAR_API void GWEN_CryptMgr_SetPeerKeyName(GWEN_CRYPTMGR *cm, const char *s)
GWEN_CryptMgr_SetLocalKeyNumber
GWENHYWFAR_API void GWEN_CryptMgr_SetLocalKeyNumber(GWEN_CRYPTMGR *cm, int i)
GWEN_CryptMgr_VerifyData
GWENHYWFAR_API int GWEN_CryptMgr_VerifyData(GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, const uint8_t *pSignature, uint32_t lSignature)
GWEN_CryptMgr_SetEncryptKeyFn
GWENHYWFAR_API GWEN_CRYPTMGR_ENCRYPTKEY_FN GWEN_CryptMgr_SetEncryptKeyFn(GWEN_CRYPTMGR *cm, GWEN_CRYPTMGR_ENCRYPTKEY_FN f)
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
GWENHYWFAR_CB
#define GWENHYWFAR_CB
Definition gwenhywfarapi.h:89
inherit.h
GWEN_INHERIT_FUNCTION_LIB_DEFS
#define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl)
Definition inherit.h:125