> For the complete documentation index, see [llms.txt](https://malwaresourcecode.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malwaresourcecode.com/home/string-hashing/crc32notable.md).

# Crc32NoTable

```cpp
#include <Windows.h>

SIZE_T StringLengthW(_In_ LPCWSTR String)
{
    LPCWSTR String2;

    for (String2 = String; *String2; ++String2);

    return (String2 - String);
}

UINT32 Crc32NoTable(PVOID Data, SIZE_T Length)
{
	PUINT8 Pointer = (PUINT8)Data;
	UINT32 Hash = 0xFFFFFFFFU;

    while (Length--) 
    {
        Hash ^= *Pointer++;
        for (int i = 0; i < 8; i++) 
        {
            if (Hash & 1)
                Hash = (Hash >> 1) ^ 0xEDB88320U;
            else
                Hash >>= 1;
        }
    }

    return Hash ^ 0xFFFFFFFFU;
}

INT main(VOID)
{
	WCHAR StringHashExample[] = L"Hash This String";
	UINT32 Hash = 0;

  Hash = Crc32NoTable(StringHashExample, (StringLengthW(StringHashExample) * sizeof(WCHAR)));

	return ERROR_SUCCESS;
}
```
