News for hackers. Stuff that matters.
Re:Sqids – Generate Short Unique IDs from Numbers by BraverHeart on Saturday November 25, 2023 @06:41PM (#38417864)
I see many people in this thread saying that this is a good way to hide insights from ids/numbers, I don't understand, aren't the generated values easily decoded? couldn't I just decode a couple of numbers to get that insight? What am I missing.
Re:Sqids – Generate Short Unique IDs from Numbers by jonasdoesthings on Saturday November 25, 2023 @06:45PM (#38417891)
The docs state:

  Not Good For:  
  [...]  
  User IDs  
    Can be decoded, revealing user count
So yeah, just using a sequential id and encoding the number with this library is not a viable idea if you want to hide your insights.
Re:Sqids – Generate Short Unique IDs from Numbers by hot_gril on Sunday November 26, 2023 @01:28AM (#38419623)
I noticed this too, and imo it's a design flaw that people get misled this way. Sequential inputs should yield sequential outputs, otherwise you might think it's meant to be unpredictable like SHA256.