Comment on Ask HN: How should I create a unique id for entries that aren't incremental?Comments−iancarroll11yIncremental IDs work best, but if you want you can hash a UUID which will work for your use case:% uuidgenB14818B6-4219-43BD-82EF-8421EC1AFBCF% echo "B14818B6-4219-43BD-82EF-8421EC1AFBCF" | shasum -a 25600ea501d47789ac5eb559f10d631b3f6df8f82b5cba9c1f9d234b705d89f1704−tim_nuwinOP11yThose urls are kind of ugly. If this helps at all, maybe I could create a public url id based off the incremental PK id's.
Comments
Incremental IDs work best, but if you want you can hash a UUID which will work for your use case:
% uuidgen
B14818B6-4219-43BD-82EF-8421EC1AFBCF
% echo "B14818B6-4219-43BD-82EF-8421EC1AFBCF" | shasum -a 256
00ea501d47789ac5eb559f10d631b3f6df8f82b5cba9c1f9d234b705d89f1704
Those urls are kind of ugly. If this helps at all, maybe I could create a public url id based off the incremental PK id's.