from Hacker News

UUIDs are a valid security tool

by stevecalifornia on 10/3/23, 9:47 PM with 2 comments

  • by fargle on 10/4/23, 2:45 AM

    what?!?!

    why would you use a UUID for this? A version 4 UUID does have about 122 random bits, so it could work OK for this use case. But firstly, it's unnecessarily short. And secondly, why? FFS, WHY?

    Why not just use a random number with the length of your choosing, encoded in hex, base-64, or whatever floats your boat?