summaryrefslogblamecommitdiffstats
path: root/mbbsd/toolkit.c
blob: 9623c5785372a7ed7ed9a61ae6e4210e35a06b09 (plain) (tree)
1
2
3
4
5
6
7
8
                                                        
                
 




                            




                                                                   
/* $Id: toolkit.c,v 1.3 2002/07/05 17:10:28 in2 Exp $ */
#include "bbs.h"

unsigned 
StringHash(unsigned char *s)
{
    unsigned int    v = 0;
    while (*s) {
    v = (v << 8) | (v >> 24);
    v ^= toupper(*s++); /* note this is case insensitive */
    }
    return (v * 2654435769UL) >> (32 - HASH_BITS);
}