gpt4 book ai didi

c# - 唯一设备 ID UWP

转载 作者:行者123 更新时间:2023-11-30 23:32:51 25 4
gpt4 key购买 nike

几天以来,我一直在尝试从我的 Windows Phone 设备上获取 MAC 地址,但都没有成功。我正在尝试为我的手机、平板电脑等获取唯一 ID。我找到了 HardwareToken 类和下面的代码

HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
IBuffer hardwareId = token.Id;
HashAlgorithmProvider hasher = HashAlgorithmProvider.OpenAlgorithm("MD5");
IBuffer hashed = hasher.HashData(hardwareId);
string hashedString = CryptographicBuffer.EncodeToHexString(hashed);

使用此代码我正在接收 ASHWID。这真的很独特吗?

最佳答案

Using this code I am receiving ASHWID. Is that really unique?

这取决于。在手机/平板电脑上比在台式机上更有可能。您可以找到确切的答案 at MSDN :

The ASHWID provides a strong binding between the app/package and the device by representing several individual hardware characteristics. In order to protect user privacy, the ASHWID varies from app to app. Unless the underlying hardware has changed, two calls from the same app will result in identical ASHWIDs. However, the ASHWID changes if the hardware profile of the device changes, such as when the user unplugs a USB Bluetooth adapter. The back-end cloud service can verify the ASHWID and compare it with previously reported values.

正在关注 Peter's Torr answer您还应该首先检查该 API 是否存在于实际设备上。尽管您也可以考虑他的建议 - 想想这是否真的能解决您的问题。

关于c# - 唯一设备 ID UWP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34153786/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com