I want to develop something similar to jsfiddle in where the user can input some data and then "save" it and get a unique random looking url that loads that data.
I don't want to make the saves sequential because I don't want anyone to grab all of my entries, as some can be private. However on the server I would like to save it in sequential order.
Is there a function or technique that converts a number into a hash that has 4 charactors without any collisions until (62 * 62 * 62 * 62 === 14776336)
entries?
For example the first entry on the server will be named 1
on the server but iUew3
to the user, the next entry will be 2
on the server but ueGR
to the user...
EDIT: I'm not sure if it's obvious but this hash-like function needs to be reversible because when the user requests ueGR
the server needs to know to server it file 2