> 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/rotr32-add-13.md).

# Rotr32 Add 13

```cpp
#include <Windows.h>

UINT32 ImplRotateRight32(UINT32 x, UINT32 Rotate)
{
    return (x >> Rotate) | (x << (32 - Rotate));
}

UINT32 HashStringRotateRight13Inc(PWCHAR String)
{
    UINT32 Hash = 0;

    for (; *String; String++)
    {
        WCHAR Index = *String;

        if (Index >= 'a' && Index <= 'z')
            Index -= 32;

        Hash = ImplRotateRight32(Hash, 13);
        Hash += (UINT8)Index;
    }

    return Hash;
}

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

  Hash = HashStringRotateRight13Inc(StringHashExample);

	return ERROR_SUCCESS;
}
```
