Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.UUID how does it do what it does?  RSS feed

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys


I need to improve our system's registration security and one of the thigns we want is the email confirmation system.
You k now how it works, the one where you get an email with a link to click which have a long unique string.

Just looking around at a way to get a guaranteed unique vaolue and found that Java now have a UUID package.
I see it 'allegidly' generates unique values, but can not find a high level description of how it works. I mean what does it key off? How does it know the value is unique?

I ran a quick test with 1,0000,000 loops and each one was unique, but as I was saying I was just wondering how it works, how it knows the value is unique?

Cheers
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37242
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked the java.util.UUID yet? There are links to the algorithm used.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!