RtlHashUnicodeString - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

/**
 * The RtlHashUnicodeString routine creates a hash value from a given Unicode string and hash algorithm.
 *
 * \param[in] String A pointer to a UNICODE_STRING structure that contains the Unicode string to be converted to a hash value.
 * \param[in] CaseInSensitive Specifies whether to treat the Unicode string as case sensitive when computing the hash value. If CaseInSensitive is TRUE, a lowercase and uppercase string hash to the same value.
 * \param[in] HashAlgorithm The hash algorithm to use.
 * \param[out] HashValue A pointer to a ULONG variable that receives the hash value.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlhashunicodestring
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlHashUnicodeString(
    _In_ PCUNICODE_STRING String,
    _In_ BOOLEAN CaseInSensitive,
    _In_ ULONG HashAlgorithm,
    _Out_ PULONG HashValue
    );

#endif

View code on GitHub
// wdm.h

NTSYSAPI NTSTATUS RtlHashUnicodeString(
  [in]  PCUNICODE_STRING String,
  [in]  BOOLEAN          CaseInSensitive,
  [in]  ULONG            HashAlgorithm,
  [out] PULONG           HashValue
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-wdm-rtlhashunicodestring)

RtlHashUnicodeString function

Description

The RtlHashUnicodeString routine creates a hash value from a given Unicode string and hash algorithm.

Parameters

String [in]

A pointer to a UNICODE_STRING structure that contains the Unicode string to be converted to a hash value.

CaseInSensitive [in]

Specifies whether to treat the Unicode string as case sensitive when computing the hash value. If CaseInSensitive is TRUE, a lowercase and uppercase string hash to the same value.

HashAlgorithm [in]

The hash algorithm to use. If HashAlgorithm is HASH_STRING_ALGORITHM_X65599, RtlHashUnicodeString uses the x65599 hashing algorithm. If HashAlgorithm is HASH_STRING_ALGORITHM_DEFAULT, RtlHashUnicodeString uses the default algorithm. Currently, the default algorithm is the x65599 hashing algorithm.

HashValue [out]

A pointer to a ULONG variable that receives the hash value.

Return value

RtlHashUnicodeString returns STATUS_SUCCESS on success, or the appropriate NTSTATUS value on failure. The routine returns a STATUS_INVALID_PARAMETER value if the Unicode string is NULL, HashValue is NULL, or the caller specifies an undefined value for HashAlgorithm.

See also

UNICODE_STRING