1

I know that can generate a UUID with NSUUID:

NSString *uuid = [[NSUUID UUID] UUIDString];

But this is 128-bit values.

I want to get a 32-bit UUID how to do that?

isaced
  • 1,735
  • 3
  • 16
  • 24
  • [What's "32-bit UUID"?](http://stackoverflow.com/q/4267475/335858) – Sergey Kalinichenko Dec 30 '14 at 01:19
  • I think the docs might mean "UUID with RFC 4122 version 4" whose bytes are random, not that it's 4 bytes long. @isaced: could you take the generated UUID, convert it to a number, & 0xffffffff, then convert the result back to NSString? – Marc Dec 30 '14 at 01:33

1 Answers1

3

A UUID by definition is 128-bit.

A UUID is a 16-octet (128-bit) number.

I believe you can make a 32-bit Unique identifier but it is advised against. If you really need to make a 32 bit Unique identifier here is a pseudo code tutorial that might help.

Community
  • 1
  • 1
MendyK
  • 1,643
  • 1
  • 17
  • 30