Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

sfhashfcn.h

Go to the documentation of this file.
00001 /*
00002         sfhashfcn.h
00003 */
00004 #ifndef SFHASHFCN_INCLUDE 
00005 #define SFHASHFCN_INCLUDE 
00006 
00007 #include <stdlib.h>
00008 #include <string.h>
00009 #include <stdio.h>
00010 #include <time.h>
00011 
00012 
00013 typedef struct _SFHASHFCN {
00014 
00015  unsigned seed;
00016  unsigned scale;
00017  unsigned hardener;
00018  unsigned (*hash_fcn)(struct _SFHASHFCN * p,
00019                       unsigned char *d,
00020                       int n );
00021  int      (*keycmp_fcn)( const void *s1,
00022                          const void *s2,
00023                          size_t n);
00024 } SFHASHFCN;
00025 
00026 SFHASHFCN * sfhashfcn_new( int nrows );
00027 void sfhashfcn_free( SFHASHFCN * p );
00028 unsigned sfhashfcn_hash( SFHASHFCN * p, unsigned char *d, int n );
00029 
00030 int sfhashfcn_set_keyops( SFHASHFCN * p,
00031                           unsigned (*hash_fcn)( SFHASHFCN * p,
00032                                                 unsigned char *d,
00033                                                 int n),
00034                           int (*keycmp_fcn)( const void *s1,
00035                                              const void *s2,
00036                                              size_t n));
00037 
00038 
00039 
00040 #endif

Generated on Sun May 14 14:51:18 2006 by  doxygen 1.4.2