Share via


HardwareIdentification.GetPackageSpecificToken(IBuffer) Method

Definition

Gets a hardware identifier (ASHWID) that represents the current hardware. The returned ASHWID will be different for each application package. In other words, this API will return different identifiers when called by two apps from different packages. It will return the same identifier when called by two apps that are part of the same package.

public:
 static HardwareToken ^ GetPackageSpecificToken(IBuffer ^ nonce);
 static HardwareToken GetPackageSpecificToken(IBuffer const& nonce);
public static HardwareToken GetPackageSpecificToken(IBuffer nonce);
function getPackageSpecificToken(nonce)
Public Shared Function GetPackageSpecificToken (nonce As IBuffer) As HardwareToken

Parameters

nonce
IBuffer

The cryptographic nonce is optional. The nonce is recommended when ASHWID needs to be verified on the cloud against replay attacks. In the scenarios where nonce is desired, the remote server should generate a random nonce and pass it to the client app, and then verify that the signature has the expected nonce once the ASHWID is received from the client system.

Returns

The hardware Id information.

Remarks

The GetPackageSpecificToken is designed for use by professional developers who have experience with licensing content and with sufficient expertise in cryptography

Applies to

See also