version 1.1, 2013/01/17 10:05:35
|
version 1.4, 2015/06/25 17:53:50
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | Copyright 2004 - 2015 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
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; |