Moro
Moro

Reputation: 2128

Select a UUID

We need to generate UUIDs for every single entry we store in the backend. As I read in Wikipedia: Uuid Java implementation, there are 3 available UUID generators:

- Standard Java UUID generator(which only support version 3 and 4)
- JUG  which support all the version but 2
- UUID  which only support version 1 (MAC address based) 

Please advise on which generator we should use, assuming the licenses are compatible ?

Upvotes: 1

Views: 1154

Answers (2)

Michael Burr
Michael Burr

Reputation: 340198

The UUID generator used by Windows is a Version 4 generator by default.

The standard Java generator using v4 UUIDs would work just fine.

Upvotes: 1

kmkaplan
kmkaplan

Reputation: 18960

Version 3 will not solve your problem of generating fresh UUID for each entry. If you have no other requirements (security for example) Version 1 is usually enough.

If you want to hide every possible information (MAC address and time of generation) use Version 4.

Upvotes: 2

Related Questions