TokenBindingGenerateID function (tokenbinding.h)

Constructs the token binding identifier by extracting the signature algorithm from the key type and copying the exported public key.

Syntax

SECURITY_STATUS TokenBindingGenerateID(
  [in]  TOKENBINDING_KEY_PARAMETERS_TYPE keyType,
  [in]  const void                       *publicKey,
  [in]  DWORD                            publicKeySize,
  [out] TOKENBINDING_RESULT_DATA         **resultData
);

Parameters

[in] keyType

The negotiated key type to use. Use a value from the list of key types that you retrieved by calling the TokenBindingGetKeyTypesClient function.

[in] publicKey

An exported public key blob.

[in] publicKeySize

The size of the exported public key blob.

[out] resultData

A pointer that receives the address of the buffer that is allocated for the token binding result data. The token binding result data contains the token binding identifier.

Use the HeapAlloc function to allocate the memory for this buffer, and the HeapFree method to free that memory.

Return value

Returns a status code that indicates the success or failure of the function.

Remarks

You can call TokenBindingGenerateID from user mode.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header tokenbinding.h
Library Tokenbinding.lib
DLL Tokenbinding.dll

See also

HeapAlloc

HeapFree

TokenBindingVerifyMessage