cryptkey.h
Go to the documentation of this file.
/*************************************************************************************************
begin : Wed Mar 16 2005
copyright : (C) 2005 by Martin Preuss
email : martin@libchipcard.de
*************************************************************************************************
* Please see toplevel file COPYING for license details *
*************************************************************************************************/
#ifndef GWEN_CRYPT_KEY_H
#define GWEN_CRYPT_KEY_H
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/cryptalgo.h>
#include <gwenhywfar/hashalgo.h>
#include <gwenhywfar/paddalgo.h>
typedef struct GWEN_CRYPT_KEY GWEN_CRYPT_KEY;
#ifdef __cplusplus
extern "C" {
#endif
GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_CRYPT_KEY, GWENHYWFAR_API)
GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_CRYPT_KEY, GWEN_Crypt_Key, GWENHYWFAR_API)
GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_CRYPT_KEY, GWEN_Crypt_Key, GWENHYWFAR_API)
GWENHYWFAR_API void GWEN_Crypt_Key_free(GWEN_CRYPT_KEY *k);
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_Key_GetCryptAlgoId(const GWEN_CRYPT_KEY *k);
GWENHYWFAR_API int GWEN_Crypt_Key_GetKeySize(const GWEN_CRYPT_KEY *k);
GWENHYWFAR_API int GWEN_Crypt_Key_GetKeyNumber(const GWEN_CRYPT_KEY *k);
GWENHYWFAR_API void GWEN_Crypt_Key_SetKeyNumber(GWEN_CRYPT_KEY *k, int i);
GWENHYWFAR_API int GWEN_Crypt_Key_GetKeyVersion(const GWEN_CRYPT_KEY *k);
GWENHYWFAR_API void GWEN_Crypt_Key_SetKeyVersion(GWEN_CRYPT_KEY *k, int i);
GWENHYWFAR_API int GWEN_Crypt_Key_Sign(GWEN_CRYPT_KEY *k,
const uint8_t *pInData,
uint32_t inLen,
uint8_t *pSignatureData,
uint32_t *pSignatureLen);
GWENHYWFAR_API int GWEN_Crypt_Key_Verify(GWEN_CRYPT_KEY *k,
const uint8_t *pInData,
uint32_t inLen,
const uint8_t *pSignatureData,
uint32_t signatureLen);
GWENHYWFAR_API int GWEN_Crypt_Key_Encipher(GWEN_CRYPT_KEY *k,
const uint8_t *pInData,
uint32_t inLen,
uint8_t *pOutData,
uint32_t *pOutLen);
GWENHYWFAR_API int GWEN_Crypt_Key_Decipher(GWEN_CRYPT_KEY *k,
const uint8_t *pInData,
uint32_t inLen,
uint8_t *pOutData,
uint32_t *pOutLen);
#ifdef __cplusplus
}
#endif
#endif
cryptalgo.h
GWEN_CRYPT_CRYPTALGOID
GWEN_CRYPT_CRYPTALGOID
Definition cryptalgo.h:52
GWEN_Crypt_Key_SetKeyNumber
GWENHYWFAR_API void GWEN_Crypt_Key_SetKeyNumber(GWEN_CRYPT_KEY *k, int i)
GWEN_Crypt_Key_Sign
GWENHYWFAR_API int GWEN_Crypt_Key_Sign(GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pSignatureData, uint32_t *pSignatureLen)
GWEN_Crypt_Key_GetKeyNumber
GWENHYWFAR_API int GWEN_Crypt_Key_GetKeyNumber(const GWEN_CRYPT_KEY *k)
GWEN_Crypt_Key_SetKeyVersion
GWENHYWFAR_API void GWEN_Crypt_Key_SetKeyVersion(GWEN_CRYPT_KEY *k, int i)
GWEN_Crypt_Key_free
GWENHYWFAR_API void GWEN_Crypt_Key_free(GWEN_CRYPT_KEY *k)
GWEN_Crypt_Key_GetKeySize
GWENHYWFAR_API int GWEN_Crypt_Key_GetKeySize(const GWEN_CRYPT_KEY *k)
GWEN_Crypt_Key_GetCryptAlgoId
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_Key_GetCryptAlgoId(const GWEN_CRYPT_KEY *k)
GWEN_Crypt_Key_Decipher
GWENHYWFAR_API int GWEN_Crypt_Key_Decipher(GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen)
GWEN_Crypt_Key_GetKeyVersion
GWENHYWFAR_API int GWEN_Crypt_Key_GetKeyVersion(const GWEN_CRYPT_KEY *k)
GWEN_Crypt_Key_Verify
GWENHYWFAR_API int GWEN_Crypt_Key_Verify(GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, const uint8_t *pSignatureData, uint32_t signatureLen)
GWEN_Crypt_Key_Encipher
GWENHYWFAR_API int GWEN_Crypt_Key_Encipher(GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen)
GWEN_CRYPT_KEY
struct GWEN_CRYPT_KEY GWEN_CRYPT_KEY
Definition cryptkey.h:26
db.h
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
hashalgo.h
inherit.h
GWEN_INHERIT_FUNCTION_LIB_DEFS
#define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl)
Definition inherit.h:125
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
paddalgo.h