Add files via upload
Cette révision appartient à :
Parent
29219a2c82
révision
b9d076a7b1
|
@ -0,0 +1,19 @@
|
|||
INT HashStringUnknownGenericHashA(PCHAR String)
|
||||
{
|
||||
PCHAR Pointer;
|
||||
INT Generic;
|
||||
INT Hash = 0;
|
||||
|
||||
for (Pointer = String; *Pointer != '\0'; Pointer++)
|
||||
{
|
||||
Hash = (Hash << 4) + (INT)(*Pointer);
|
||||
Generic = Hash & 0xF0000000L;
|
||||
|
||||
if (Generic != 0)
|
||||
Hash = Hash ^ (Generic >> 24);
|
||||
|
||||
Hash = Hash &~ Generic;
|
||||
}
|
||||
|
||||
return Hash;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
INT HashStringUnknownGenericHashW(PWCHAR String)
|
||||
{
|
||||
PWCHAR Pointer;
|
||||
INT Generic;
|
||||
INT Hash = 0;
|
||||
|
||||
for (Pointer = String; *Pointer != '\0'; Pointer++)
|
||||
{
|
||||
Hash = (Hash << 4) + (INT)(*Pointer);
|
||||
Generic = Hash & 0xF0000000L;
|
||||
|
||||
if (Generic != 0)
|
||||
Hash = Hash ^ (Generic >> 24);
|
||||
|
||||
Hash = Hash &~ Generic;
|
||||
}
|
||||
|
||||
return Hash;
|
||||
}
|
Chargement…
Référencer dans un nouveau ticket