ctfile_be.h File Reference
`#include <gwenhywfar/ct_be.h>`

Go to the source code of this file.

## Typedefs

typedef int GWENHYWFAR_CB(* | GWEN_CRYPT_TOKEN_FILE_READ_FN) (GWEN_CRYPT_TOKEN *ct, int fd, uint32_t gid)
typedef int GWENHYWFAR_CB(* | GWEN_CRYPT_TOKEN_FILE_WRITE_FN) (GWEN_CRYPT_TOKEN *ct, int fd, int cre, uint32_t gid)

## Functions

GWENHYWFAR_API void | GWEN_Crypt_TokenFile_AddContext (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_CONTEXT *ctx)
GWENHYWFAR_API GWEN_CRYPT_TOKEN_CONTEXT * | GWEN_Crypt_TokenFile_GetContext (GWEN_CRYPT_TOKEN *ct, int idx)
GWENHYWFAR_API GWEN_CRYPT_TOKEN * | GWEN_Crypt_TokenFile_new (const char *typeName, const char *tokenName)
GWENHYWFAR_API GWEN_CRYPT_TOKEN_FILE_READ_FN | GWEN_Crypt_TokenFile_SetReadFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_FILE_READ_FN f)
GWENHYWFAR_API GWEN_CRYPT_TOKEN_FILE_WRITE_FN | GWEN_Crypt_TokenFile_SetWriteFn (GWEN_CRYPT_TOKEN *ct, GWEN_CRYPT_TOKEN_FILE_WRITE_FN f)

## Typedef Documentation

## GWEN_CRYPT_TOKEN_FILE_READ_FN

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_FILE_READ_FN) (GWEN_CRYPT_TOKEN *ct, int fd, uint32_t gid)

Definition at line 20 of file ctfile_be.h.

## GWEN_CRYPT_TOKEN_FILE_WRITE_FN

typedef int GWENHYWFAR_CB(* GWEN_CRYPT_TOKEN_FILE_WRITE_FN) (GWEN_CRYPT_TOKEN *ct, int fd, int cre, uint32_t gid)

Definition at line 23 of file ctfile_be.h.

## Function Documentation

## GWEN_Crypt_TokenFile_AddContext()

GWENHYWFAR_API void GWEN_Crypt_TokenFile_AddContext | ( | GWEN_CRYPT_TOKEN * | ct,
|  | GWEN_CRYPT_TOKEN_CONTEXT * | ctx )

References GWENHYWFAR_API.

## GWEN_Crypt_TokenFile_GetContext()

GWENHYWFAR_API GWEN_CRYPT_TOKEN_CONTEXT * GWEN_Crypt_TokenFile_GetContext | ( | GWEN_CRYPT_TOKEN * | ct,
|  | int | idx )

## GWEN_Crypt_TokenFile_new()

GWENHYWFAR_API GWEN_CRYPT_TOKEN * GWEN_Crypt_TokenFile_new | ( | const char * | typeName,
|  | const char * | tokenName )

Key ids: The left 16 bits contain the context index, the right 16 bits contain the key number:

- xx01=localSignKey
- xx02=localCryptKey
- xx03=remoteSignKey
- xx04=remoteCryptKey
- xx05=localAuthKey
- xx06=remoteAuthKey
- xx07=tempLocalSignKey

References GWENHYWFAR_API.

## GWEN_Crypt_TokenFile_SetReadFn()

GWENHYWFAR_API GWEN_CRYPT_TOKEN_FILE_READ_FN GWEN_Crypt_TokenFile_SetReadFn | ( | GWEN_CRYPT_TOKEN * | ct,
|  | GWEN_CRYPT_TOKEN_FILE_READ_FN | f )

References GWENHYWFAR_API.

## GWEN_Crypt_TokenFile_SetWriteFn()

GWENHYWFAR_API GWEN_CRYPT_TOKEN_FILE_WRITE_FN GWEN_Crypt_TokenFile_SetWriteFn | ( | GWEN_CRYPT_TOKEN * | ct,
|  | GWEN_CRYPT_TOKEN_FILE_WRITE_FN | f )

References GWENHYWFAR_API.