gnutls_hash_int.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GNUTLS_HASH_INT_H
00026 # define GNUTLS_HASH_INT_H
00027
00028 #include <gnutls_int.h>
00029
00030
00031
00032 typedef struct
00033 {
00034 MHD_gc_hash_handle handle;
00035 enum MHD_GNUTLS_HashAlgorithm algorithm;
00036 const void *key;
00037 int keysize;
00038 } mac_hd_st;
00039 typedef mac_hd_st *mac_hd_t;
00040 typedef mac_hd_t GNUTLS_HASH_HANDLE;
00041
00042 #define GNUTLS_HASH_FAILED NULL
00043 #define GNUTLS_MAC_FAILED NULL
00044
00045 mac_hd_t MHD_gtls_MHD_hmac_init (enum MHD_GNUTLS_HashAlgorithm algorithm,
00046 const void *key, int keylen);
00047
00048 void MHD_gnutls_MHD_hmac_deinit (mac_hd_t handle, void *digest);
00049
00050 mac_hd_t MHD_gnutls_mac_init_ssl3 (enum MHD_GNUTLS_HashAlgorithm algorithm,
00051 void *key, int keylen);
00052 void MHD_gnutls_mac_deinit_ssl3 (mac_hd_t handle, void *digest);
00053
00054 GNUTLS_HASH_HANDLE MHD_gtls_hash_init (enum MHD_GNUTLS_HashAlgorithm
00055 algorithm);
00056 int MHD_gnutls_hash_get_algo_len (enum MHD_GNUTLS_HashAlgorithm algorithm);
00057 int MHD_gnutls_hash (GNUTLS_HASH_HANDLE handle, const void *text,
00058 size_t textlen);
00059 void MHD_gnutls_hash_deinit (GNUTLS_HASH_HANDLE handle, void *digest);
00060
00061 int MHD_gnutls_ssl3_generate_random (void *secret, int secret_len,
00062 void *rnd, int random_len, int bytes,
00063 opaque * ret);
00064 int MHD_gnutls_ssl3_hash_md5 (void *first, int first_len, void *second,
00065 int second_len, int ret_len, opaque * ret);
00066
00067 void MHD_gnutls_mac_deinit_ssl3_handshake (mac_hd_t handle, void *digest,
00068 opaque * key, uint32_t key_size);
00069
00070 GNUTLS_HASH_HANDLE MHD_gnutls_hash_copy (GNUTLS_HASH_HANDLE handle);
00071
00072 #endif