gwenhywfar 5.14.1
cryptkey_be.h File Reference
#include <gwenhywfar/cryptkey.h>
Include dependency graph for cryptkey_be.h:

Go to the source code of this file.

Typedefs

typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_DECIPHER_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen)
typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_ENCIPHER_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen)
typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_SIGN_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pSignatureData, uint32_t *pSignatureLen)
typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_VERIFY_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, const uint8_t *pSignatureData, uint32_t signatureLen)

Functions

GWENHYWFAR_API GWEN_CRYPT_KEYGWEN_Crypt_Key_dup (const GWEN_CRYPT_KEY *k)
GWENHYWFAR_API GWEN_CRYPT_KEYGWEN_Crypt_Key_fromDb (GWEN_DB_NODE *db)
GWENHYWFAR_API GWEN_CRYPT_KEYGWEN_Crypt_Key_new (GWEN_CRYPT_CRYPTALGOID cryptAlgoId, int keySize)
GWENHYWFAR_API GWEN_CRYPT_KEY_DECIPHER_FN GWEN_Crypt_Key_SetDecipherFn (GWEN_CRYPT_KEY *k, GWEN_CRYPT_KEY_DECIPHER_FN f)
GWENHYWFAR_API GWEN_CRYPT_KEY_ENCIPHER_FN GWEN_Crypt_Key_SetEncipherFn (GWEN_CRYPT_KEY *k, GWEN_CRYPT_KEY_ENCIPHER_FN f)
GWENHYWFAR_API GWEN_CRYPT_KEY_SIGN_FN GWEN_Crypt_Key_SetSignFn (GWEN_CRYPT_KEY *k, GWEN_CRYPT_KEY_SIGN_FN f)
GWENHYWFAR_API GWEN_CRYPT_KEY_VERIFY_FN GWEN_Crypt_Key_SetVerifyFn (GWEN_CRYPT_KEY *k, GWEN_CRYPT_KEY_VERIFY_FN f)
GWENHYWFAR_API int GWEN_Crypt_Key_toDb (const GWEN_CRYPT_KEY *k, GWEN_DB_NODE *db)

Typedef Documentation

◆ GWEN_CRYPT_KEY_DECIPHER_FN

typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_DECIPHER_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen)

Definition at line 36 of file cryptkey_be.h.

◆ GWEN_CRYPT_KEY_ENCIPHER_FN

typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_ENCIPHER_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pOutData, uint32_t *pOutLen)

Definition at line 31 of file cryptkey_be.h.

◆ GWEN_CRYPT_KEY_SIGN_FN

typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_SIGN_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, uint8_t *pSignatureData, uint32_t *pSignatureLen)

Definition at line 21 of file cryptkey_be.h.

◆ GWEN_CRYPT_KEY_VERIFY_FN

typedef GWENHYWFAR_CB int(* GWEN_CRYPT_KEY_VERIFY_FN) (GWEN_CRYPT_KEY *k, const uint8_t *pInData, uint32_t inLen, const uint8_t *pSignatureData, uint32_t signatureLen)

Definition at line 26 of file cryptkey_be.h.

Function Documentation

◆ GWEN_Crypt_Key_dup()

GWENHYWFAR_API GWEN_CRYPT_KEY * GWEN_Crypt_Key_dup ( const GWEN_CRYPT_KEY * k)

Definition at line 137 of file cryptkey.c.

References GWEN_Crypt_Key_new(), and NULL.

Here is the call graph for this function:

◆ GWEN_Crypt_Key_fromDb()

GWENHYWFAR_API GWEN_CRYPT_KEY * GWEN_Crypt_Key_fromDb ( GWEN_DB_NODE * db)

Definition at line 80 of file cryptkey.c.

References DBG_ERROR, GWEN_CRYPT_CRYPTALGOID, GWEN_Crypt_CryptAlgoId_fromString(), GWEN_Crypt_Key_new(), GWEN_DB_GetCharValue(), GWEN_DB_GetIntValue(), GWEN_LOGDOMAIN, and NULL.

Referenced by GWEN_Crypt_KeyRsa_fromDb(), GWEN_Crypt_KeySym__fromDb(), and GWEN_Crypt_KeySym_fromDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Crypt_Key_new()

GWENHYWFAR_API GWEN_CRYPT_KEY * GWEN_Crypt_Key_new ( GWEN_CRYPT_CRYPTALGOID cryptAlgoId,
int keySize )

◆ GWEN_Crypt_Key_SetDecipherFn()

◆ GWEN_Crypt_Key_SetEncipherFn()

◆ GWEN_Crypt_Key_SetSignFn()

Definition at line 219 of file cryptkey.c.

Referenced by GWEN_Crypt_KeyRsa_fromDb(), and GWEN_Crypt_KeyRsa_GeneratePair().

Here is the caller graph for this function:

◆ GWEN_Crypt_Key_SetVerifyFn()

Definition at line 232 of file cryptkey.c.

Referenced by GWEN_Crypt_KeyRsa_fromDb(), and GWEN_Crypt_KeyRsa_GeneratePair().

Here is the caller graph for this function:

◆ GWEN_Crypt_Key_toDb()

GWENHYWFAR_API int GWEN_Crypt_Key_toDb ( const GWEN_CRYPT_KEY * k,
GWEN_DB_NODE * db )

Definition at line 117 of file cryptkey.c.

References GWEN_Crypt_CryptAlgoId_toString(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), and GWEN_DB_SetIntValue().

Referenced by GWEN_Crypt_KeyRsa_toDb(), GWEN_Crypt_KeySym__toDb(), and GWEN_Crypt_KeySym_toDb().

Here is the call graph for this function:
Here is the caller graph for this function: