加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

使用.NET Compact Framework 3.5在Windows CE设备上生成的GUID在

发布时间:2020-12-14 01:55:36 所属栏目:Windows 来源:网络整理
导读:我知道你可以在单台和多台机器上敲击GUID生成,并且统计上不太可能两次生成相同的GUID. 互联网上有很多信息可以证明这一点. 可以说100%的Windows CE 4,5 6个设备运行基于.NET Compact Framework 3.5生成GUID的应用程序? 我假设是,但找不到任何证明WinCE操作
我知道你可以在单台和多台机器上敲击GUID生成,并且统计上不太可能两次生成相同的GUID.

互联网上有很多信息可以证明这一点.

可以说100%的Windows CE 4,5& 6个设备运行基于.NET Compact Framework 3.5生成GUID的应用程序?

我假设是,但找不到任何证明WinCE操作系统使用随机数的信息,并且它们是随机的.

任何人都可以提供此类信息和参考吗?

谢谢,

J.

解决方法

从针对.NET Compact Framework的Guid上的 early article开始

The .NET Compact Framework team constantly made tradeoffs between the
framework footprint size,performance,and implementation time. The
full .NET Framework Guid.NewGuid method calls the Windows API function
CoCreateGuid that calls UuidCreate to generate globally unique 128-bit
numbers. Unfortunately,these functions are not supported on the
Pocket PC,so the Guid.NewGuid method was not implemented for the .NET
Compact Framework.

本文提出了一种等于Windows版本的算法

It turns out that it’s easy to write a custom implementation of the
Guid.NewGuid method. The following shows a test application that
generates GUIDs on the Pocket PC. It uses a custom class called
PocketGuid,that uses the same algorithm as desktop GUIDs and is
discussed in more detail later in this paper.

从2.0开始,实际的紧凑框架包含Guid.NewGuid方法,我认为它们包含了所提到的代码,这些代码在WinCE上产生了相同的Guids强度/唯一性.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读