Add files via upload

This commit is contained in:
vxunderground 2021-05-30 01:47:01 -05:00 committed by GitHub
parent c53171494a
commit 8c6093c64e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,19 @@
UINT32 HashStringJenkinsOneAtATime32BitA(PCHAR String)
{
SIZE_T Index = 0;
UINT32 Hash = 0;
SIZE_T Length = StringLengthA(String);
while (Index != Length)
{
Hash += String[Index++];
Hash += Hash << 10;
Hash ^= Hash >> 6;
}
Hash += Hash << 3;
Hash ^= Hash >> 11;
Hash += Hash << 15;
return Hash;
}

View File

@ -0,0 +1,19 @@
UINT32 HashStringJenkinsOneAtATime32BitW(PWCHAR String)
{
SIZE_T Index = 0;
UINT32 Hash = 0;
SIZE_T Length = StringLengthW(String);
while (Index != Length)
{
Hash += String[Index++];
Hash += Hash << 10;
Hash ^= Hash >> 6;
}
Hash += Hash << 3;
Hash ^= Hash >> 11;
Hash += Hash << 15;
return Hash;
}