3 ms·
You can use http://hashids.org/ http://hashids.org/. It obfuscated the real ids with reversible (but secret and un-guessable) transformation so on the server I
by kjksf 11y ago
You can use http://hashids.org/ http://hashids.org/. It obfuscated the real ids with reversible (but secret and un-guessable) transformation so on the server I deal with numeric ids (like 5) but the browser sees something like vgRg. I wrote up a bit more about this: https://quicknotes.io/n/vgRg-how-to-prevent-competitors-from- https://quicknotes.io/n/vgRg-how-to-prevent-competitors-from...
- imron 11y agoThe link you provided to the write up is not a valid link.
- kjksf 11y agoSorry about that, it was a private note. Fixed now.
- deleted 11y ago[deleted]
- dchest 11y agoThe are not secret and not unguessable, they use some homegrown cipher, calling the result of encryption a "hash" for some reason (http://carnage.github.io/2015/08/cryptanalysis-of-hashids/ http://carnage.github.io/2015/08/cryptanalysis-of-hashids/)
- yetanothercoder 11y agoIt's for search/seo reasons. http://hashids.org/#why-hashids http://hashids.org/#why-hashids
- michaelt 11y agoI see in your note you say there are many implementations of this idea Is there a general name for this pattern? I'd like to find some of the other libraries for doing the same thing.