00001 00002 /* 00003 ** Copyright (C) 2002 Russell Leighton 00004 ** 00005 ** This program is free software; you can redistribute it and/or modify 00006 ** it under the terms of the GNU General Public License as published by 00007 ** the Free Software Foundation; either version 2 of the License, or 00008 ** (at your option) any later version. 00009 ** 00010 ** This program is distributed in the hope that it will be useful, 00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 ** GNU General Public License for more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program; if not, write to the Free Software 00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef __AW_JENKINS__ 00021 #define __AW_JENKINS__ 00022 00029 #include "errors.h" 00030 #include "util.h" 00031 00032 /* 00033 @function aw_jhash32 00034 @discussion Compute Jenkins hash on 32bit unsigned int 00035 @param k 32bit key 00036 @result 32bit result 00037 */ 00038 __inline__ u_int32_t aw_jhash32(u_int32_t k); 00039 00040 00041 /* 00042 @function aw_jhash64 00043 @discussion Compute Jenkins hash on 64bit unsigned int 00044 @param k 64bit key 00045 @result 64bit result 00046 */ 00047 __inline__ u_int64_t aw_jhash64(u_int64_t k); 00048 00049 00050 /* 00051 @function aw_jhashString 00052 @discussion Compute Jenkins hash on string 00053 @param k null terminated string key 00054 @result 32bit result 00055 */ 00056 __inline__ u_int32_t aw_jhashString(const byte_t *k); 00057 00058 #endif