I'm looking from some kind of obfuscation bidirectional algorithm, that maps integer (in a range, like [0 , 2^10]
) to a string, to avoid URL manipulation
I see here that is suggested to generate a random string and use that as ID, but I need to associate this string to already existing data, thing that I would not consider that scalable, since I would have to generate the string for 400k entries... and furthermore, I can't encrypt it since I need this to be stored in a NFC tag, and so the memory is very limited
For the moment, I'm converting int to UUID, but at the end of the day, this changes anything, it's just the int value with some 0s as paddings
Are there anything like this?
The use cause would be:
mywebsite.com/something/1
# becomes
mywebsite.com/something/{string n char long}
where I can convert that string to int and the other way around, so there is no "easy way" for someone to go to mywebsite.com/something/2
I just need an idea, but if someone has already something like this in PHP, thank you