cryptdefs.c File Reference

#include "cryptdefs_p.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/mdigest.h>
#include <gcrypt.h>
Include dependency graph for cryptdefs.c:

Go to the source code of this file.

Functions

static int GWEN_Crypt__KeyDataFromText (const char *text, unsigned char *buffer, unsigned int bufLength)
int GWEN_Crypt__TransformFromBCD (unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)
int GWEN_Crypt__TransformFromBin (unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)
int GWEN_Crypt__TransformFromFPIN2 (unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)
int GWEN_Crypt__TransformToBCD (unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)
int GWEN_Crypt__TransformToBin (unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)
int GWEN_Crypt__TransformToFPIN2 (unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)
int GWEN_Crypt_KeyDataFromText (const char *text, unsigned char *buffer, unsigned int bufLength)
GWEN_CRYPT_PINENCODING GWEN_Crypt_PinEncoding_fromString (const char *s)
const char * GWEN_Crypt_PinEncoding_toString (GWEN_CRYPT_PINENCODING pe)
GWEN_CRYPT_PINTYPE GWEN_Crypt_PinType_fromString (const char *s)
const char * GWEN_Crypt_PinType_toString (GWEN_CRYPT_PINTYPE pt)
void GWEN_Crypt_Random (int quality, uint8_t *buffer, uint32_t len)
int GWEN_Crypt_TransformPin (GWEN_CRYPT_PINENCODING peSrc, GWEN_CRYPT_PINENCODING peDst, unsigned char *buffer, unsigned int bufLength, unsigned int *pinLength)

Function Documentation

static int GWEN_Crypt__KeyDataFromText ( const char *  text,
unsigned char *  buffer,
unsigned int  bufLength 
) [static]

Definition at line 465 of file cryptdefs.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_BAD_SIZE, GWEN_LOGDOMAIN, GWEN_MDigest_Begin(), GWEN_MDigest_End(), GWEN_MDigest_free(), GWEN_MDigest_GetDigestPtr(), GWEN_MDigest_Md5_new(), GWEN_MDigest_Rmd160_new(), and GWEN_MDigest_Update().

Referenced by GWEN_Crypt_KeyDataFromText().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Crypt__TransformFromBCD ( unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)

Definition at line 93 of file cryptdefs.c.

References DBG_ERROR, GWEN_ERROR_BUFFER_OVERFLOW, and GWEN_LOGDOMAIN.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

int GWEN_Crypt__TransformFromBin ( unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)

Definition at line 201 of file cryptdefs.c.

References DBG_ERROR, GWEN_ERROR_INVALID, and GWEN_LOGDOMAIN.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

int GWEN_Crypt__TransformFromFPIN2 ( unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)

Definition at line 143 of file cryptdefs.c.

References DBG_ERROR, GWEN_ERROR_BUFFER_OVERFLOW, GWEN_ERROR_INVALID, and GWEN_LOGDOMAIN.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

int GWEN_Crypt__TransformToBCD ( unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)

Definition at line 236 of file cryptdefs.c.

References DBG_ERROR, GWEN_ERROR_BUFFER_OVERFLOW, GWEN_ERROR_INVALID, and GWEN_LOGDOMAIN.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

int GWEN_Crypt__TransformToBin ( unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)

Definition at line 366 of file cryptdefs.c.

References DBG_ERROR, GWEN_ERROR_INVALID, and GWEN_LOGDOMAIN.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

int GWEN_Crypt__TransformToFPIN2 ( unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)

Definition at line 299 of file cryptdefs.c.

References DBG_ERROR, GWEN_ERROR_BUFFER_OVERFLOW, GWEN_ERROR_INVALID, and GWEN_LOGDOMAIN.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

int GWEN_Crypt_KeyDataFromText ( const char *  text,
unsigned char *  buffer,
unsigned int  bufLength 
)

Definition at line 516 of file cryptdefs.c.

References GWEN_Crypt__KeyDataFromText().

Here is the call graph for this function:

GWEN_CRYPT_PINENCODING GWEN_Crypt_PinEncoding_fromString ( const char *  s  ) 
const char* GWEN_Crypt_PinEncoding_toString ( GWEN_CRYPT_PINENCODING  pe  ) 

Definition at line 74 of file cryptdefs.c.

References GWEN_Crypt_PinEncoding_Ascii, GWEN_Crypt_PinEncoding_Bcd, GWEN_Crypt_PinEncoding_Bin, GWEN_Crypt_PinEncoding_FPin2, and GWEN_Crypt_PinEncoding_None.

Referenced by GWEN_Crypt_TransformPin().

Here is the caller graph for this function:

GWEN_CRYPT_PINTYPE GWEN_Crypt_PinType_fromString ( const char *  s  ) 
const char* GWEN_Crypt_PinType_toString ( GWEN_CRYPT_PINTYPE  pt  ) 
void GWEN_Crypt_Random ( int  quality,
uint8_t *  buffer,
uint32_t  len 
)

Definition at line 534 of file cryptdefs.c.

Referenced by GWEN_Crypt_KeyDes3K_Generate(), GWEN_Padd_AddPkcs1Pss(), GWEN_Padd_PaddWithIso9796_2(), and GWEN_Padd_PaddWithPkcs1Bt2().

Here is the caller graph for this function:

int GWEN_Crypt_TransformPin ( GWEN_CRYPT_PINENCODING  peSrc,
GWEN_CRYPT_PINENCODING  peDst,
unsigned char *  buffer,
unsigned int  bufLength,
unsigned int *  pinLength 
)
Generated on Mon Jul 5 22:53:20 2010 for gwenhywfar by  doxygen 1.6.3