(wdm.h) RtlHashUnicodeString 函式

RtlHashUnicodeString 例程會從指定的 Unicode 字串和哈希演算法建立哈希值。

語法

NTSYSAPI NTSTATUS RtlHashUnicodeString(
  [in]  PCUNICODE_STRING String,
  [in]  BOOLEAN          CaseInSensitive,
  [in]  ULONG            HashAlgorithm,
  [out] PULONG           HashValue
);

參數

[in] String

UNICODE_STRING 結構的指標,其中包含要轉換成哈希值的 Unicode 字串。

[in] CaseInSensitive

指定計算哈希值時,是否要將 Unicode 字串視為區分大小寫。 如果 CaseInSensitiveTRUE,則為相同值的小寫和大寫字串哈希。

[in] HashAlgorithm

要使用的雜湊演算法。 如果 HashAlgorithmHASH_STRING_ALGORITHM_X65599,RtlHashUnicodeString 會使用 x65599 哈希演算法。 如果 HashAlgorithmHASH_STRING_ALGORITHM_DEFAULT,RtlHashUnicodeString 會使用預設演算法。 目前,預設演算法是 x65599 哈希演算法。

[out] HashValue

接收哈希值的ULONG變數指標。

傳回值

RtlHashUnicodeString 會在成功時傳回STATUS_SUCCESS,或在失敗時傳回適當的 NTSTATUS 值。 如果 Unicode 字串為 NULLHashValueNULL,或呼叫端指定 HashAlgorithm 的未定義值,則例程會傳回STATUS_INVALID_PARAMETER值。

規格需求

需求
最低支援的用戶端 可在 Windows XP 和更新版本的 Windows 中使用。
目標平台 Universal
標頭 wdm.h (包括 Wdm.h、Ntddk.h、Ntifs.h)
程式庫 NtosKrnl.lib
Dll NtosKrnl.exe
IRQL <= APC_LEVEL

另請參閱

UNICODE_STRING