private static BufToHash ( char buf, int len ) : int | ||
buf | char | |
len | int | |
Résultat | int |
private static int BufToHash(char[] buf, int len)
{
int hash = len;
hash <<= 5;
hash += buf[0] - 0x60;
int j = len;
for (int i = 0; i < 4 && j > 0; i++)
{
j--;
hash <<= 5;
hash += buf[j] - 0x60;
}
return hash;
}