version 1.1, 2013/01/17 10:05:35
|
version 1.2, 2013/05/30 09:07:33
|
Line 54 SUCH DAMAGE.
|
Line 54 SUCH DAMAGE.
|
* @nVer = Version of algorythm; 0 - original, 1 - AITNET variant |
* @nVer = Version of algorythm; 0 - original, 1 - AITNET variant |
* return: Hash value |
* return: Hash value |
*/ |
*/ |
inline u_int | u_int |
hash_varchar(const char *csStr, int nStrLen, int nVer) |
hash_varchar(const char *csStr, int nStrLen, int nVer) |
{ |
{ |
register u_int n, hash = 0; |
register u_int n, hash = 0; |
Line 85 hash_varchar(const char *csStr, int nStrLen, int nVer)
|
Line 85 hash_varchar(const char *csStr, int nStrLen, int nVer)
|
* @nVer = Version of algorythm; 0 - Bernstein, 1 - DJBX33A variant |
* @nVer = Version of algorythm; 0 - Bernstein, 1 - DJBX33A variant |
* return: Hash value |
* return: Hash value |
*/ |
*/ |
inline u_int | u_int |
hash_bernstein(const char *csStr, int nStrLen, int nVer) |
hash_bernstein(const char *csStr, int nStrLen, int nVer) |
{ |
{ |
register u_int hash = INIT_BERNSTEIN; |
register u_int hash = INIT_BERNSTEIN; |
Line 110 hash_bernstein(const char *csStr, int nStrLen, int nVe
|
Line 110 hash_bernstein(const char *csStr, int nStrLen, int nVe
|
* @nVer = Version of algorythm; 0 - FNV-1, 1 - FNV-1a (best avalanche) |
* @nVer = Version of algorythm; 0 - FNV-1, 1 - FNV-1a (best avalanche) |
* return: Hash value |
* return: Hash value |
*/ |
*/ |
inline u_int | u_int |
hash_fnv1(const char *csStr, int nStrLen, int nVer) |
hash_fnv1(const char *csStr, int nStrLen, int nVer) |
{ |
{ |
register u_int hash = INIT_FNV1; |
register u_int hash = INIT_FNV1; |
Line 137 hash_fnv1(const char *csStr, int nStrLen, int nVer)
|
Line 137 hash_fnv1(const char *csStr, int nStrLen, int nVer)
|
* @nStrLen = Length of data buffer |
* @nStrLen = Length of data buffer |
* return: Hash value |
* return: Hash value |
*/ |
*/ |
inline u_int | u_int |
hash_jenkins(const char *csStr, int nStrLen) |
hash_jenkins(const char *csStr, int nStrLen) |
{ |
{ |
register u_int hash = 0; |
register u_int hash = 0; |
Line 164 hash_jenkins(const char *csStr, int nStrLen)
|
Line 164 hash_jenkins(const char *csStr, int nStrLen)
|
* @nStrLen = Length of data buffer |
* @nStrLen = Length of data buffer |
* return: Hash value |
* return: Hash value |
*/ |
*/ |
inline u_int | u_int |
hash_reddragon(const char *csStr, int nStrLen) |
hash_reddragon(const char *csStr, int nStrLen) |
{ |
{ |
register u_int g, hash; |
register u_int g, hash; |