ctplugin.h File Reference
`#include <gwenhywfar/gwenhywfarapi.h>`
`#include <gwenhywfar/plugin.h>`
`#include <gwenhywfar/ct.h>`

Go to the source code of this file.

## Macros

#define | GWEN_CRYPT_TOKEN_FOLDER "ct"
#define | GWEN_CRYPT_TOKEN_PLUGIN_TYPENAME "ct"

## Functions

GWENHYWFAR_API int | GWEN_Crypt_Token_Plugin_CheckToken (GWEN_PLUGIN *pl, GWEN_BUFFER *name)
GWENHYWFAR_API GWEN_CRYPT_TOKEN * | GWEN_Crypt_Token_Plugin_CreateToken (GWEN_PLUGIN *pl, const char *name)
GWENHYWFAR_API GWEN_CRYPT_TOKEN_DEVICE | GWEN_Crypt_Token_Plugin_GetDeviceType (const GWEN_PLUGIN *pl)
CryptManager
GWENHYWFAR_API int | GWEN_Crypt_Token_PluginManager_CheckToken (GWEN_PLUGIN_MANAGER *cm, GWEN_CRYPT_TOKEN_DEVICE devt, GWEN_BUFFER *typeName, GWEN_BUFFER *tokenName, uint32_t guiid)
GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2 * | GWEN_Crypt_Token_PluginManager_GetPluginDescrs (GWEN_PLUGIN_MANAGER *pm, GWEN_CRYPT_TOKEN_DEVICE devt)

## Macro Definition Documentation

## GWEN_CRYPT_TOKEN_FOLDER

#define GWEN_CRYPT_TOKEN_FOLDER "ct"

Definition at line 25 of file ctplugin.h.

## GWEN_CRYPT_TOKEN_PLUGIN_TYPENAME

#define GWEN_CRYPT_TOKEN_PLUGIN_TYPENAME "ct"

Definition at line 24 of file ctplugin.h.

## Function Documentation

## GWEN_Crypt_Token_Plugin_CheckToken()

GWENHYWFAR_API int GWEN_Crypt_Token_Plugin_CheckToken | ( | GWEN_PLUGIN * | pl,
|  | GWEN_BUFFER * | name )

This function is used to let a crypt token plugin check whether it supports a given plugin.

Initially the given buffers may contain some values to narrow the search. For chip cards the name argument may contain the serial number of the card (if known). For file based crypt tokens this argument must contain the path to the file to check.

This function should return one of the following error codes:

- GWEN_SUCCESS: CryptToken is supported by this plugin, the buffers for typeName, subTypeName and name are updated accordingly
- GWEN_ERROR_CT_NOT_IMPLEMENTED: function not implmented
- GWEN_ERROR_CT_NOT_SUPPORTED: medium not supported by this plugin
- GWEN_ERROR_CT_BAD_NAME: Medium is supported but the name doesn't match that of the currently checked medium
- GWEN_ERROR_CT_IO_ERROR: any type of IO error occurred
- other codes as appropriate

References GWENHYWFAR_API.

## GWEN_Crypt_Token_Plugin_CreateToken()

GWENHYWFAR_API GWEN_CRYPT_TOKEN * GWEN_Crypt_Token_Plugin_CreateToken | ( | GWEN_PLUGIN * | pl,
|  | const char * | name )

References GWENHYWFAR_API.

## GWEN_Crypt_Token_Plugin_GetDeviceType()

GWENHYWFAR_API GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_Plugin_GetDeviceType | ( | const GWEN_PLUGIN * | pl | ) |

References GWENHYWFAR_API.

## GWEN_Crypt_Token_PluginManager_CheckToken()

GWENHYWFAR_API int GWEN_Crypt_Token_PluginManager_CheckToken | ( | GWEN_PLUGIN_MANAGER * | cm,
|  | GWEN_CRYPT_TOKEN_DEVICE | devt,
|  | GWEN_BUFFER * | typeName,
|  | GWEN_BUFFER * | tokenName,
|  | uint32_t | guiid )

This function tries to find a token plugin which is able to handle the token given by the device type and name.

References GWENHYWFAR_API.

## GWEN_Crypt_Token_PluginManager_GetPluginDescrs()

GWENHYWFAR_API GWEN_PLUGIN_DESCRIPTION_LIST2 * GWEN_Crypt_Token_PluginManager_GetPluginDescrs | ( | GWEN_PLUGIN_MANAGER * | pm,
|  | GWEN_CRYPT_TOKEN_DEVICE | devt )