Is it possible to do something like this with regular expressions: encode and decode a number?
For example I want to encode the id 15123 (which actually represents a port number in my case) into something which is useless to a user, for example a seemingly random string such as c95Dd7!7. And then decode it afterwards.
I want to do this with a regular expression because I will need the decoded id for URL Rewriting.
I know javascript packer does about the same… but I have no clue where to start. Or are there any out-of-the-box examples or solutions for my question?
Thanks!
Going along with what Steve B. mentioned.
My thought would be to do some simple encoding since it just appears you want to do a simple keep the user in the dark idea.
Maybe reverse the bytes and output to a string? Should be fairly unreadable but easier to convert.