ct_be.h File Reference

#include <gwenhywfar/ct.h>
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/hashalgo.h>

Go to the source code of this file.

Typedefs

Prototypes for Virtual Functions
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_CHANGEPIN_FN )(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_CLOSE_FN )(GWEN_CRYPT_TOKEN *ct, int abandon, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_CREATE_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_DECIPHER_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_ENCIPHER_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GENERATEKEY_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, const GWEN_CRYPT_CRYPTALGO *a, uint32_t gid)
typedef const
GWEN_CRYPT_TOKEN_CONTEXT
*GWENHYWFAR_CB(* 
GWEN_CRYPT_TOKEN_GETCONTEXT_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t *pIdList, uint32_t *pCount, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t *pIdList, uint32_t *pCount, uint32_t gid)
typedef const
GWEN_CRYPT_TOKEN_KEYINFO
*GWENHYWFAR_CB(* 
GWEN_CRYPT_TOKEN_GETKEYINFO_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t flags, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_OPEN_FN )(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_SETCONTEXT_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t id, const GWEN_CRYPT_TOKEN_CONTEXT *ctx, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_SETKEYINFO_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t id, const GWEN_CRYPT_TOKEN_KEYINFO *ki, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_SIGN_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, uint8_t *pSignatureData, uint32_t *pSignatureLen, uint32_t *pSeqCounter, uint32_t gid)
typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_VERIFY_FN )(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, const uint8_t *pSignatureData, uint32_t signatureLen, uint32_t seqCounter, uint32_t gid)

Functions

Setting CryptToken Information
GWENHYWFAR_API void GWEN_Crypt_Token_AddFlags (GWEN_CRYPT_TOKEN *ct, uint32_t f)
GWENHYWFAR_API void GWEN_Crypt_Token_SetFlags (GWEN_CRYPT_TOKEN *ct, uint32_t f)
GWENHYWFAR_API void GWEN_Crypt_Token_SetTokenName (GWEN_CRYPT_TOKEN *ct, const char *s)
GWENHYWFAR_API void GWEN_Crypt_Token_SubFlags (GWEN_CRYPT_TOKEN *ct, uint32_t f)
Interactive Helper Functions
GWENHYWFAR_API uint32_t GWEN_Crypt_Token_BeginEnterPin (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_PINTYPE pt, uint32_t gid)
GWENHYWFAR_API int GWEN_Crypt_Token_EndEnterPin (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_PINTYPE pt, int ok, uint32_t id)
GWENHYWFAR_API int GWEN_Crypt_Token_GetPin (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_PINTYPE pt, GWEN_CRYPT_PINENCODING pe, uint32_t flags, unsigned char *pwbuffer, unsigned int minLength, unsigned int maxLength, unsigned int *pinLength, uint32_t gid)
GWENHYWFAR_API int GWEN_Crypt_Token_InsertCorrectToken (GWEN_CRYPT_TOKEN *ct, uint32_t gid)
GWENHYWFAR_API int GWEN_Crypt_Token_InsertToken (GWEN_CRYPT_TOKEN *ct, uint32_t gid)
GWENHYWFAR_API int GWEN_Crypt_Token_SetPinStatus (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_PINTYPE pt, GWEN_CRYPT_PINENCODING pe, uint32_t flags, const unsigned char *buffer, unsigned int pinLength, int isOk, uint32_t gid)
Contructor
GWENHYWFAR_API GWEN_CRYPT_TOKENGWEN_Crypt_Token_new (GWEN_CRYPT_TOKEN_DEVICE dev, const char *typeName, const char *tokenName)
Setter for Virtual Functions
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_CHANGEPIN_FN 
GWEN_Crypt_Token_SetChangePinFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_CHANGEPIN_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_CLOSE_FN 
GWEN_Crypt_Token_SetCloseFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_CLOSE_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_CREATE_FN 
GWEN_Crypt_Token_SetCreateFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_CREATE_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_DECIPHER_FN 
GWEN_Crypt_Token_SetDecipherFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_DECIPHER_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_ENCIPHER_FN 
GWEN_Crypt_Token_SetEncipherFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_ENCIPHER_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GENERATEKEY_FN 
GWEN_Crypt_Token_SetGenerateKeyFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_GENERATEKEY_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GETCONTEXT_FN 
GWEN_Crypt_Token_SetGetContextFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_GETCONTEXT_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN 
GWEN_Crypt_Token_SetGetContextIdListFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN 
GWEN_Crypt_Token_SetGetKeyIdListFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GETKEYINFO_FN 
GWEN_Crypt_Token_SetGetKeyInfoFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_GETKEYINFO_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_OPEN_FN 
GWEN_Crypt_Token_SetOpenFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_OPEN_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_SETCONTEXT_FN 
GWEN_Crypt_Token_SetSetContextFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_SETCONTEXT_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_SETKEYINFO_FN 
GWEN_Crypt_Token_SetSetKeyInfoFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_SETKEYINFO_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_SIGN_FN 
GWEN_Crypt_Token_SetSignFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_SIGN_FN f)
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_VERIFY_FN 
GWEN_Crypt_Token_SetVerifyFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_VERIFY_FN f)


Typedef Documentation

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_CHANGEPIN_FN)(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid)

Definition at line 125 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_CLOSE_FN)(GWEN_CRYPT_TOKEN *ct, int abandon, uint32_t gid)

Definition at line 39 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_CREATE_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t gid)

Definition at line 37 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_DECIPHER_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen, uint32_t gid)

Definition at line 108 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_ENCIPHER_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen, uint32_t gid)

Definition at line 98 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GENERATEKEY_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, const GWEN_CRYPT_CRYPTALGO *a, uint32_t gid)

Definition at line 119 of file ct_be.h.

typedef const GWEN_CRYPT_TOKEN_CONTEXT* GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GETCONTEXT_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t gid)

Definition at line 64 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t *pIdList, uint32_t *pCount, uint32_t gid)

Definition at line 59 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t *pIdList, uint32_t *pCount, uint32_t gid)

Definition at line 42 of file ct_be.h.

typedef const GWEN_CRYPT_TOKEN_KEYINFO* GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_GETKEYINFO_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t flags, uint32_t gid)

Definition at line 47 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_OPEN_FN)(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid)

Definition at line 35 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_SETCONTEXT_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t id, const GWEN_CRYPT_TOKEN_CONTEXT *ctx, uint32_t gid)

Definition at line 69 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_SETKEYINFO_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t id, const GWEN_CRYPT_TOKEN_KEYINFO *ki, uint32_t gid)

Definition at line 53 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_SIGN_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, uint8_t *pSignatureData, uint32_t *pSignatureLen, uint32_t *pSeqCounter, uint32_t gid)

Definition at line 76 of file ct_be.h.

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_VERIFY_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t keyId, GWEN_CRYPT_PADDALGO *a, const uint8_t *pInData, uint32_t inLen, const uint8_t *pSignatureData, uint32_t signatureLen, uint32_t seqCounter, uint32_t gid)

Definition at line 87 of file ct_be.h.


Function Documentation

GWENHYWFAR_API void GWEN_Crypt_Token_AddFlags ( GWEN_CRYPT_TOKEN ct,
uint32_t  f 
)

Definition at line 153 of file ct.c.

GWENHYWFAR_API uint32_t GWEN_Crypt_Token_BeginEnterPin ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_PINTYPE  pt,
uint32_t  gid 
)

GWENHYWFAR_API int GWEN_Crypt_Token_EndEnterPin ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_PINTYPE  pt,
int  ok,
uint32_t  id 
)

GWENHYWFAR_API int GWEN_Crypt_Token_GetPin ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_PINTYPE  pt,
GWEN_CRYPT_PINENCODING  pe,
uint32_t  flags,
unsigned char *  pwbuffer,
unsigned int  minLength,
unsigned int  maxLength,
unsigned int *  pinLength,
uint32_t  gid 
)

GWENHYWFAR_API int GWEN_Crypt_Token_InsertCorrectToken ( GWEN_CRYPT_TOKEN ct,
uint32_t  gid 
)

GWENHYWFAR_API int GWEN_Crypt_Token_InsertToken ( GWEN_CRYPT_TOKEN ct,
uint32_t  gid 
)

GWENHYWFAR_API GWEN_CRYPT_TOKEN* GWEN_Crypt_Token_new ( GWEN_CRYPT_TOKEN_DEVICE  dev,
const char *  typeName,
const char *  tokenName 
)

Definition at line 34 of file ct.c.

References GWEN_INHERIT_INIT, GWEN_LIST_INIT, and GWEN_NEW_OBJECT.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_CHANGEPIN_FN GWEN_Crypt_Token_SetChangePinFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_CHANGEPIN_FN  f 
)

Definition at line 725 of file ct.c.

GWENHYWFAR_API GWEN_CRYPT_TOKEN_CLOSE_FN GWEN_Crypt_Token_SetCloseFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_CLOSE_FN  f 
)

Definition at line 551 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_CREATE_FN GWEN_Crypt_Token_SetCreateFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_CREATE_FN  f 
)

Definition at line 536 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_DECIPHER_FN GWEN_Crypt_Token_SetDecipherFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_DECIPHER_FN  f 
)

Definition at line 696 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_ENCIPHER_FN GWEN_Crypt_Token_SetEncipherFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_ENCIPHER_FN  f 
)

Definition at line 682 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API void GWEN_Crypt_Token_SetFlags ( GWEN_CRYPT_TOKEN ct,
uint32_t  f 
)

Definition at line 144 of file ct.c.

GWENHYWFAR_API GWEN_CRYPT_TOKEN_GENERATEKEY_FN GWEN_Crypt_Token_SetGenerateKeyFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_GENERATEKEY_FN  f 
)

Definition at line 711 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_GETCONTEXT_FN GWEN_Crypt_Token_SetGetContextFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_GETCONTEXT_FN  f 
)

Definition at line 625 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN GWEN_Crypt_Token_SetGetContextIdListFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN  f 
)

Definition at line 610 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN GWEN_Crypt_Token_SetGetKeyIdListFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN  f 
)

Definition at line 566 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_GETKEYINFO_FN GWEN_Crypt_Token_SetGetKeyInfoFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_GETKEYINFO_FN  f 
)

Definition at line 581 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_OPEN_FN GWEN_Crypt_Token_SetOpenFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_OPEN_FN  f 
)

Definition at line 522 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API int GWEN_Crypt_Token_SetPinStatus ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_PINTYPE  pt,
GWEN_CRYPT_PINENCODING  pe,
uint32_t  flags,
const unsigned char *  buffer,
unsigned int  pinLength,
int  isOk,
uint32_t  gid 
)

GWENHYWFAR_API GWEN_CRYPT_TOKEN_SETCONTEXT_FN GWEN_Crypt_Token_SetSetContextFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_SETCONTEXT_FN  f 
)

Definition at line 640 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_SETKEYINFO_FN GWEN_Crypt_Token_SetSetKeyInfoFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_SETKEYINFO_FN  f 
)

Definition at line 595 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API GWEN_CRYPT_TOKEN_SIGN_FN GWEN_Crypt_Token_SetSignFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_SIGN_FN  f 
)

Definition at line 654 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API void GWEN_Crypt_Token_SetTokenName ( GWEN_CRYPT_TOKEN ct,
const char *  s 
)

Definition at line 102 of file ct.c.

GWENHYWFAR_API GWEN_CRYPT_TOKEN_VERIFY_FN GWEN_Crypt_Token_SetVerifyFn ( GWEN_CRYPT_TOKEN ct,
GWEN_CRYPT_TOKEN_VERIFY_FN  f 
)

Definition at line 668 of file ct.c.

Referenced by GWEN_Crypt_TokenFile_new().

GWENHYWFAR_API void GWEN_Crypt_Token_SubFlags ( GWEN_CRYPT_TOKEN ct,
uint32_t  f 
)

Definition at line 162 of file ct.c.


Generated on Mon Jan 25 12:56:03 2010 for gwenhywfar by  doxygen 1.5.6