gnutls_hash_int.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
00003  *
00004  * Author: Nikos Mavrogiannopoulos
00005  *
00006  * This file is part of GNUTLS.
00007  *
00008  * The GNUTLS library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00021  * USA
00022  *
00023  */
00024 
00025 #ifndef GNUTLS_HASH_INT_H
00026 # define GNUTLS_HASH_INT_H
00027 
00028 #include <gnutls_int.h>
00029 
00030 /* for message digests */
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 /* GNUTLS_HASH_INT_H */

Generated on Fri Feb 27 18:32:19 2009 for GNU libmicrohttpd by  doxygen 1.5.7.1