gc.h File Reference

#include <stddef.h>

Include dependency graph for gc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GC_MD2_DIGEST_SIZE   16
#define GC_MD4_DIGEST_SIZE   16
#define GC_MD5_DIGEST_SIZE   16
#define GC_RMD160_DIGEST_SIZE   20
#define GC_SHA1_DIGEST_SIZE   20
#define GC_SHA256_DIGEST_SIZE   32
#define GC_SHA384_DIGEST_SIZE   48
#define GC_SHA512_DIGEST_SIZE   64

Typedefs

typedef enum Gc_rc Gc_rc
typedef enum Gc_hash Gc_hash
typedef enum Gc_hash_mode Gc_hash_mode
typedef void * MHD_gc_hash_handle
typedef enum Gc_cipher Gc_cipher
typedef enum Gc_cipher_mode Gc_cipher_mode
typedef void * MHD_gc_cipher_handle
typedef void *(* MHD_gc_malloc_t )(size_t n)
typedef int(* MHD_gc_secure_check_t )(const void *)
typedef void *(* MHD_gc_realloc_t )(void *p, size_t n)
typedef void(* MHD_gc_free_t )(void *)

Enumerations

enum  Gc_rc {
  GC_OK = 0, GC_MALLOC_ERROR, GC_INIT_ERROR, GC_RANDOM_ERROR,
  GC_INVALID_CIPHER, GC_INVALID_HASH, GC_PKCS5_INVALID_ITERATION_COUNT, GC_PKCS5_INVALID_DERIVED_KEY_LENGTH,
  GC_PKCS5_DERIVED_KEY_TOO_LONG
}
enum  Gc_hash {
  GC_MD4, GC_MD5, GC_SHA1, GC_MD2,
  GC_RMD160, GC_SHA256, GC_SHA384, GC_SHA512
}
enum  Gc_hash_mode { GC_HMAC = 1 }
enum  Gc_cipher {
  GC_AES128, GC_AES192, GC_AES256, GC_3DES,
  GC_DES, GC_ARCFOUR128, GC_ARCFOUR40, GC_ARCTWO40,
  GC_CAMELLIA128, GC_CAMELLIA256
}
enum  Gc_cipher_mode { GC_ECB, GC_CBC, GC_STREAM }

Functions

Gc_rc MHD_gc_init (void)
void MHD_gc_done (void)
Gc_rc MHD_gc_nonce (char *data, size_t datalen)
Gc_rc MHD_gc_pseudo_random (char *data, size_t datalen)
Gc_rc MHD_gc_cipher_open (Gc_cipher cipher, Gc_cipher_mode mode, MHD_gc_cipher_handle *outhandle)
Gc_rc MHD_gc_cipher_setkey (MHD_gc_cipher_handle handle, size_t keylen, const char *key)
Gc_rc MHD_gc_cipher_setiv (MHD_gc_cipher_handle handle, size_t ivlen, const char *iv)
Gc_rc MHD_gc_cipher_encrypt_inline (MHD_gc_cipher_handle handle, size_t len, char *data)
Gc_rc MHD_gc_cipher_decrypt_inline (MHD_gc_cipher_handle handle, size_t len, char *data)
Gc_rc MHD_gc_cipher_close (MHD_gc_cipher_handle handle)
Gc_rc MHD_gc_hash_open (Gc_hash hash, Gc_hash_mode mode, MHD_gc_hash_handle *outhandle)
Gc_rc MHD_gc_hash_clone (MHD_gc_hash_handle handle, MHD_gc_hash_handle *outhandle)
size_t MHD_gc_hash_digest_length (Gc_hash hash)
void MHD_gc_hash_MHD_hmac_setkey (MHD_gc_hash_handle handle, size_t len, const char *key)
void MHD_gc_hash_write (MHD_gc_hash_handle handle, size_t len, const char *data)
const char * MHD_gc_hash_read (MHD_gc_hash_handle handle)
void MHD_gc_hash_close (MHD_gc_hash_handle handle)
Gc_rc MHD_gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *out)
Gc_rc MHD_gc_md2 (const void *in, size_t inlen, void *resbuf)
Gc_rc MHD_gc_md4 (const void *in, size_t inlen, void *resbuf)
Gc_rc MHD_gc_md5 (const void *in, size_t inlen, void *resbuf)
Gc_rc MHD_gc_sha1 (const void *in, size_t inlen, void *resbuf)
Gc_rc MHD_gc_MHD_hmac_md5 (const void *key, size_t keylen, const void *in, size_t inlen, char *resbuf)
Gc_rc MHD_gc_MHD_hmac_sha1 (const void *key, size_t keylen, const void *in, size_t inlen, char *resbuf)
Gc_rc MHD_gc_pbkdf2_sha1 (const char *P, size_t Plen, const char *S, size_t Slen, unsigned int c, char *DK, size_t dkLen)


Define Documentation

#define GC_MD2_DIGEST_SIZE   16

Definition at line 63 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_MD4_DIGEST_SIZE   16

Definition at line 64 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_MD5_DIGEST_SIZE   16

Definition at line 65 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_RMD160_DIGEST_SIZE   20

Definition at line 66 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_SHA1_DIGEST_SIZE   20

Definition at line 67 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_SHA256_DIGEST_SIZE   32

Definition at line 68 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_SHA384_DIGEST_SIZE   48

Definition at line 69 of file gc.h.

Referenced by MHD_gc_hash_digest_length().

#define GC_SHA512_DIGEST_SIZE   64

Definition at line 70 of file gc.h.

Referenced by MHD_gc_hash_digest_length().


Typedef Documentation

typedef enum Gc_cipher Gc_cipher

Definition at line 86 of file gc.h.

Definition at line 94 of file gc.h.

typedef enum Gc_hash Gc_hash

Definition at line 53 of file gc.h.

typedef enum Gc_hash_mode Gc_hash_mode

Definition at line 59 of file gc.h.

typedef enum Gc_rc Gc_rc

Definition at line 39 of file gc.h.

typedef void* MHD_gc_cipher_handle

Definition at line 96 of file gc.h.

typedef void(* MHD_gc_free_t)(void *)

Definition at line 106 of file gc.h.

typedef void* MHD_gc_hash_handle

Definition at line 61 of file gc.h.

typedef void*(* MHD_gc_malloc_t)(size_t n)

Definition at line 103 of file gc.h.

typedef void*(* MHD_gc_realloc_t)(void *p, size_t n)

Definition at line 105 of file gc.h.

typedef int(* MHD_gc_secure_check_t)(const void *)

Definition at line 104 of file gc.h.


Enumeration Type Documentation

enum Gc_cipher

Enumerator:
GC_AES128 
GC_AES192 
GC_AES256 
GC_3DES 
GC_DES 
GC_ARCFOUR128 
GC_ARCFOUR40 
GC_ARCTWO40 
GC_CAMELLIA128 
GC_CAMELLIA256 

Definition at line 73 of file gc.h.

Enumerator:
GC_ECB 
GC_CBC 
GC_STREAM 

Definition at line 88 of file gc.h.

enum Gc_hash

Enumerator:
GC_MD4 
GC_MD5 
GC_SHA1 
GC_MD2 
GC_RMD160 
GC_SHA256 
GC_SHA384 
GC_SHA512 

Definition at line 42 of file gc.h.

Enumerator:
GC_HMAC 

Definition at line 55 of file gc.h.

enum Gc_rc

Enumerator:
GC_OK 
GC_MALLOC_ERROR 
GC_INIT_ERROR 
GC_RANDOM_ERROR 
GC_INVALID_CIPHER 
GC_INVALID_HASH 
GC_PKCS5_INVALID_ITERATION_COUNT 
GC_PKCS5_INVALID_DERIVED_KEY_LENGTH 
GC_PKCS5_DERIVED_KEY_TOO_LONG 

Definition at line 27 of file gc.h.


Function Documentation

Gc_rc MHD_gc_cipher_close ( MHD_gc_cipher_handle  handle  ) 

Definition at line 203 of file gc-libgcrypt.c.

References GC_OK.

Referenced by MHD_gnutls_cipher_deinit().

Here is the caller graph for this function:

Gc_rc MHD_gc_cipher_decrypt_inline ( MHD_gc_cipher_handle  handle,
size_t  len,
char *  data 
)

Definition at line 192 of file gc-libgcrypt.c.

References GC_INVALID_CIPHER, and GC_OK.

Referenced by MHD_gtls_cipher_decrypt().

Here is the caller graph for this function:

Gc_rc MHD_gc_cipher_encrypt_inline ( MHD_gc_cipher_handle  handle,
size_t  len,
char *  data 
)

Definition at line 181 of file gc-libgcrypt.c.

References GC_INVALID_CIPHER, and GC_OK.

Referenced by MHD_gtls_cipher_encrypt().

Here is the caller graph for this function:

Gc_rc MHD_gc_cipher_open ( Gc_cipher  cipher,
Gc_cipher_mode  mode,
MHD_gc_cipher_handle outhandle 
)

Definition at line 87 of file gc-libgcrypt.c.

References GC_3DES, GC_AES128, GC_AES192, GC_AES256, GC_ARCFOUR128, GC_ARCFOUR40, GC_ARCTWO40, GC_CBC, GC_DES, GC_ECB, GC_INVALID_CIPHER, GC_OK, and GC_STREAM.

Referenced by MHD_gtls_cipher_init().

Here is the caller graph for this function:

Gc_rc MHD_gc_cipher_setiv ( MHD_gc_cipher_handle  handle,
size_t  ivlen,
const char *  iv 
)

Definition at line 168 of file gc-libgcrypt.c.

References GC_INVALID_CIPHER, and GC_OK.

Referenced by MHD_gtls_cipher_init().

Here is the caller graph for this function:

Gc_rc MHD_gc_cipher_setkey ( MHD_gc_cipher_handle  handle,
size_t  keylen,
const char *  key 
)

Definition at line 155 of file gc-libgcrypt.c.

References GC_INVALID_CIPHER, and GC_OK.

Referenced by MHD_gtls_cipher_init().

Here is the caller graph for this function:

void MHD_gc_done ( void   ) 

Definition at line 57 of file gc-libgcrypt.c.

Referenced by MHD__gnutls_global_deinit().

Here is the caller graph for this function:

Gc_rc MHD_gc_hash_buffer ( Gc_hash  hash,
const void *  in,
size_t  inlen,
char *  out 
)

Gc_rc MHD_gc_hash_clone ( MHD_gc_hash_handle  handle,
MHD_gc_hash_handle outhandle 
)

Definition at line 303 of file gc-libgcrypt.c.

References GC_INVALID_HASH, GC_MALLOC_ERROR, and GC_OK.

Referenced by MHD_gnutls_hash_copy().

Here is the caller graph for this function:

void MHD_gc_hash_close ( MHD_gc_hash_handle  handle  ) 

Definition at line 400 of file gc-libgcrypt.c.

Referenced by MHD_gnutls_hash_deinit(), and MHD_gnutls_MHD_hmac_deinit().

Here is the caller graph for this function:

size_t MHD_gc_hash_digest_length ( Gc_hash  hash  ) 

void MHD_gc_hash_MHD_hmac_setkey ( MHD_gc_hash_handle  handle,
size_t  len,
const char *  key 
)

Definition at line 372 of file gc-libgcrypt.c.

Referenced by MHD_gtls_MHD_hmac_init().

Here is the caller graph for this function:

Gc_rc MHD_gc_hash_open ( Gc_hash  hash,
Gc_hash_mode  mode,
MHD_gc_hash_handle outhandle 
)

Definition at line 220 of file gc-libgcrypt.c.

References GC_HMAC, GC_INVALID_HASH, GC_MALLOC_ERROR, GC_MD2, GC_MD4, GC_MD5, GC_OK, GC_RMD160, GC_SHA1, GC_SHA256, GC_SHA384, and GC_SHA512.

Referenced by MHD_gtls_hash_init(), and MHD_gtls_MHD_hmac_init().

Here is the caller graph for this function:

const char* MHD_gc_hash_read ( MHD_gc_hash_handle  handle  ) 

Definition at line 387 of file gc-libgcrypt.c.

Referenced by MHD_gnutls_hash_deinit(), and MHD_gnutls_MHD_hmac_deinit().

Here is the caller graph for this function:

void MHD_gc_hash_write ( MHD_gc_hash_handle  handle,
size_t  len,
const char *  data 
)

Definition at line 380 of file gc-libgcrypt.c.

Referenced by MHD_gnutls_hash().

Here is the caller graph for this function:

Gc_rc MHD_gc_init ( void   ) 

Definition at line 39 of file gc-libgcrypt.c.

References GC_INIT_ERROR, and GC_OK.

Referenced by MHD__gnutls_global_init().

Here is the caller graph for this function:

Gc_rc MHD_gc_md2 ( const void *  in,
size_t  inlen,
void *  resbuf 
)

Gc_rc MHD_gc_md4 ( const void *  in,
size_t  inlen,
void *  resbuf 
)

Gc_rc MHD_gc_md5 ( const void *  in,
size_t  inlen,
void *  resbuf 
)

Gc_rc MHD_gc_MHD_hmac_md5 ( const void *  key,
size_t  keylen,
const void *  in,
size_t  inlen,
char *  resbuf 
)

Gc_rc MHD_gc_MHD_hmac_sha1 ( const void *  key,
size_t  keylen,
const void *  in,
size_t  inlen,
char *  resbuf 
)

Gc_rc MHD_gc_nonce ( char *  data,
size_t  datalen 
)

Definition at line 67 of file gc-libgcrypt.c.

References GC_OK.

Referenced by calc_enc_length(), MHD__gnutls_proc_rsa_client_kx(), MHD_gtls_compressed2ciphertext(), MHD_gtls_generate_session_id(), and MHD_gtls_tls_create_random().

Here is the caller graph for this function:

Gc_rc MHD_gc_pbkdf2_sha1 ( const char *  P,
size_t  Plen,
const char *  S,
size_t  Slen,
unsigned int  c,
char *  DK,
size_t  dkLen 
)

Gc_rc MHD_gc_pseudo_random ( char *  data,
size_t  datalen 
)

Definition at line 74 of file gc-libgcrypt.c.

References GC_OK.

Referenced by MHD__gnutls_gen_rsa_client_kx(), MHD__gnutls_global_init(), and MHD_gtls_pkcs1_rsa_encrypt().

Here is the caller graph for this function:

Gc_rc MHD_gc_sha1 ( const void *  in,
size_t  inlen,
void *  resbuf 
)


Generated on Fri Feb 27 18:18:54 2009 for GNU libmicrohttpd by  doxygen 1.5.8