Re: How to create a GUID?
Re: How to create a GUID?
- Subject: Re: How to create a GUID?
- From: "Chris Suter" <email@hidden>
- Date: Mon, 8 Sep 2008 22:13:56 +1000
On Mon, Sep 8, 2008 at 8:28 PM, I. Savant <email@hidden> wrote:
> On Sep 7, 2008, at 10:44 PM, Adam R. Maxwell wrote:
>
> In addition to all the CFUUID solutions, there's also [[NSProcessInfo
>> processInfo] globallyUniqueString]; a one-liner, but not thread safe.
>>
>
> This, according to the documentation, "includes the host name, process ID,
> and a time stamp, which ensures that the ID is unique for the network."
>
> I admit that I do not know "everything there is to know" about the
> subject, but as I recall from the very wiki page I originally posted, this
> is not "unique enough" across all computers in the world.
>
> Can anybody verify this?
On Leopard (and possibly earlier–I haven't checked), it appears that the
string returned is actually a UUID created with the CFUUID functions
concatenated with the process ID and the result of mach_absolute_time() so
the result isn't a proper UUID. I'm not sure where the host name is coming
from; it's possible that the CFUUID functions incorporate it somehow.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden