gwenhywfar 5.12.0
cryptalgo.h File Reference
#include <gwenhywfar/list2.h>
#include <gwenhywfar/db.h>
Include dependency graph for cryptalgo.h:

Go to the source code of this file.

Typedefs

typedef struct GWEN_CRYPT_CRYPTALGO GWEN_CRYPT_CRYPTALGO

Enumerations

enum  GWEN_CRYPT_CRYPTMODE {
  GWEN_Crypt_CryptMode_Unknown =-1 , GWEN_Crypt_CryptMode_None =0 , GWEN_Crypt_CryptMode_Ecb , GWEN_Crypt_CryptMode_Cfb ,
  GWEN_Crypt_CryptMode_Cbc
}

Functions

GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_Attach (GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOGWEN_Crypt_CryptAlgo_dup (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_free (GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOGWEN_Crypt_CryptAlgo_fromDb (GWEN_DB_NODE *db)
GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_GetChunkSize (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_CryptAlgo_GetId (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API uint32_t GWEN_Crypt_CryptAlgo_GetInitVectorLen (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API uint8_t * GWEN_Crypt_CryptAlgo_GetInitVectorPtr (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_GetKeySizeInBits (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API GWEN_CRYPT_CRYPTMODE GWEN_Crypt_CryptAlgo_GetMode (const GWEN_CRYPT_CRYPTALGO *a)
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOGWEN_Crypt_CryptAlgo_new (GWEN_CRYPT_CRYPTALGOID id, GWEN_CRYPT_CRYPTMODE m)
GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_SetChunkSize (GWEN_CRYPT_CRYPTALGO *a, int s)
GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_SetInitVector (GWEN_CRYPT_CRYPTALGO *a, const uint8_t *pv, uint32_t lv)
GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_SetKeySizeInBits (GWEN_CRYPT_CRYPTALGO *a, int s)
GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_toDb (const GWEN_CRYPT_CRYPTALGO *a, GWEN_DB_NODE *db)
GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_CryptAlgoId_fromString (const char *s)
GWENHYWFAR_API const char * GWEN_Crypt_CryptAlgoId_toString (GWEN_CRYPT_CRYPTALGOID a)
GWENHYWFAR_API GWEN_CRYPT_CRYPTMODE GWEN_Crypt_CryptMode_fromString (const char *s)
GWENHYWFAR_API const char * GWEN_Crypt_CryptMode_toString (GWEN_CRYPT_CRYPTMODE m)
 GWEN_LIST2_FUNCTION_LIB_DEFS (GWEN_CRYPT_CRYPTALGO, GWEN_Crypt_CryptAlgo, GWENHYWFAR_API) } typedef enum

Variables

 GWEN_CRYPT_CRYPTALGOID

Typedef Documentation

◆ GWEN_CRYPT_CRYPTALGO

Definition at line 20 of file cryptalgo.h.

Enumeration Type Documentation

◆ GWEN_CRYPT_CRYPTMODE

Enumerator
GWEN_Crypt_CryptMode_Unknown 
GWEN_Crypt_CryptMode_None 
GWEN_Crypt_CryptMode_Ecb 
GWEN_Crypt_CryptMode_Cfb 
GWEN_Crypt_CryptMode_Cbc 

Definition at line 55 of file cryptalgo.h.

Function Documentation

◆ GWEN_Crypt_CryptAlgo_Attach()

GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_Attach ( GWEN_CRYPT_CRYPTALGO * a)

Definition at line 129 of file cryptalgo.c.

◆ GWEN_Crypt_CryptAlgo_dup()

GWENHYWFAR_API GWEN_CRYPT_CRYPTALGO * GWEN_Crypt_CryptAlgo_dup ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 211 of file cryptalgo.c.

References GWEN_Crypt_CryptAlgo_free(), GWEN_Crypt_CryptAlgo_new(), and NULL.

Here is the call graph for this function:

◆ GWEN_Crypt_CryptAlgo_free()

GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_free ( GWEN_CRYPT_CRYPTALGO * a)

Definition at line 234 of file cryptalgo.c.

References GWEN_FREE_OBJECT, and NULL.

Referenced by genKey(), and GWEN_Crypt_CryptAlgo_dup().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptAlgo_fromDb()

◆ GWEN_Crypt_CryptAlgo_GetChunkSize()

GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_GetChunkSize ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 317 of file cryptalgo.c.

Referenced by GWEN_Crypt_TokenFile__GenerateKey().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptAlgo_GetId()

GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_CryptAlgo_GetId ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 254 of file cryptalgo.c.

References GWEN_CRYPT_CRYPTALGOID.

Referenced by GWEN_Crypt_TokenFile__GenerateKey().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptAlgo_GetInitVectorLen()

GWENHYWFAR_API uint32_t GWEN_Crypt_CryptAlgo_GetInitVectorLen ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 281 of file cryptalgo.c.

◆ GWEN_Crypt_CryptAlgo_GetInitVectorPtr()

GWENHYWFAR_API uint8_t * GWEN_Crypt_CryptAlgo_GetInitVectorPtr ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 272 of file cryptalgo.c.

◆ GWEN_Crypt_CryptAlgo_GetKeySizeInBits()

GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_GetKeySizeInBits ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 337 of file cryptalgo.c.

◆ GWEN_Crypt_CryptAlgo_GetMode()

GWENHYWFAR_API GWEN_CRYPT_CRYPTMODE GWEN_Crypt_CryptAlgo_GetMode ( const GWEN_CRYPT_CRYPTALGO * a)

Definition at line 263 of file cryptalgo.c.

◆ GWEN_Crypt_CryptAlgo_new()

Definition at line 113 of file cryptalgo.c.

References GWEN_CRYPT_CRYPTALGOID, and GWEN_NEW_OBJECT.

Referenced by genKey(), GWEN_Crypt_CryptAlgo_dup(), and GWEN_Crypt_CryptAlgo_fromDb().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptAlgo_SetChunkSize()

GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_SetChunkSize ( GWEN_CRYPT_CRYPTALGO * a,
int s )

Definition at line 327 of file cryptalgo.c.

Referenced by genKey().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptAlgo_SetInitVector()

GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_SetInitVector ( GWEN_CRYPT_CRYPTALGO * a,
const uint8_t * pv,
uint32_t lv )

Definition at line 290 of file cryptalgo.c.

References GWEN_ERROR_MEMORY_FULL, and NULL.

Referenced by GWEN_Crypt_CryptAlgo_fromDb().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptAlgo_SetKeySizeInBits()

GWENHYWFAR_API void GWEN_Crypt_CryptAlgo_SetKeySizeInBits ( GWEN_CRYPT_CRYPTALGO * a,
int s )

Definition at line 347 of file cryptalgo.c.

◆ GWEN_Crypt_CryptAlgo_toDb()

GWENHYWFAR_API int GWEN_Crypt_CryptAlgo_toDb ( const GWEN_CRYPT_CRYPTALGO * a,
GWEN_DB_NODE * db )

◆ GWEN_Crypt_CryptAlgoId_fromString()

GWENHYWFAR_API GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_CryptAlgoId_fromString ( const char * s)

Definition at line 28 of file cryptalgo.c.

References GWEN_CRYPT_CRYPTALGOID, and GWEN_Crypt_CryptAlgoId_fromString().

Referenced by genKey(), GWEN_Crypt_CryptAlgo_fromDb(), GWEN_Crypt_CryptAlgoId_fromString(), and GWEN_Crypt_Key_fromDb().

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

◆ GWEN_Crypt_CryptAlgoId_toString()

GWENHYWFAR_API const char * GWEN_Crypt_CryptAlgoId_toString ( GWEN_CRYPT_CRYPTALGOID a)

◆ GWEN_Crypt_CryptMode_fromString()

GWENHYWFAR_API GWEN_CRYPT_CRYPTMODE GWEN_Crypt_CryptMode_fromString ( const char * s)

Definition at line 79 of file cryptalgo.c.

References GWEN_Crypt_CryptMode_Cbc, GWEN_Crypt_CryptMode_Cfb, GWEN_Crypt_CryptMode_Ecb, GWEN_Crypt_CryptMode_None, and GWEN_Crypt_CryptMode_Unknown.

Referenced by GWEN_Crypt_CryptAlgo_fromDb().

Here is the caller graph for this function:

◆ GWEN_Crypt_CryptMode_toString()

GWENHYWFAR_API const char * GWEN_Crypt_CryptMode_toString ( GWEN_CRYPT_CRYPTMODE m)

Definition at line 95 of file cryptalgo.c.

References GWEN_Crypt_CryptMode_Cbc, GWEN_Crypt_CryptMode_Cfb, GWEN_Crypt_CryptMode_Ecb, and GWEN_Crypt_CryptMode_None.

Referenced by GWEN_Crypt_CryptAlgo_toDb().

Here is the caller graph for this function:

◆ GWEN_LIST2_FUNCTION_LIB_DEFS()

GWEN_LIST2_FUNCTION_LIB_DEFS ( GWEN_CRYPT_CRYPTALGO ,
GWEN_Crypt_CryptAlgo ,
GWENHYWFAR_API  )

RSA

DSA

triple-key DES

Definition at line 26 of file cryptalgo.h.

References GWENHYWFAR_API.

Variable Documentation

◆ GWEN_CRYPT_CRYPTALGOID