4 ms·
Or just use ints and encrypt them when you want to return them to the user. https://sqids.org/ https://sqids.org/
by itake 2y ago
Or just use ints and encrypt them when you want to return them to the user.
https://sqids.org/ https://sqids.org/
- perfmode 2y agoNB: may be more accurate to call this hashing, versus encryption
- jerbear4328 2y agoActually, it's not hashing either, it's just encoding. Anyone who knows the alphabet can easily decode them.
- itake 2y agoMy link didn’t link to there library I thought it was. We encrypted ids at Yelp, not hashed them.
- carpenecopinum 2y agoI like the general idea, but the page you linked explicitly states that it isn't meant to be used to hide (user) IDs, or actually encrypt data.
- itake 2y agoTouché. The project used to be called hashids, but I guess they renamed it when they weren’t actually hashes