News for hackers. Stuff that matters.
Re:We Chose NanoIDs for PlanetScale’s API by survirtual on Thursday December 29, 2022 @03:45PM (#34177688)
Why not just do a SHA2/3 hash + b58 & truncate as desired? Seems pretty simple.

For immutable data, that sort of identifier has an added benefit of deduping data.

For mutable data, just take a hash of a cryptographically secure random function.

Re:We Chose NanoIDs for PlanetScale’s API by keredson on Thursday December 29, 2022 @04:24PM (#34178191)
if you have a cryptographically secure random function, just use that. no need to hash it!
Re:We Chose NanoIDs for PlanetScale’s API by survirtual on Thursday December 29, 2022 @04:35PM (#34178335)
Good point!

Hashing is so magical I may overdo it.