Vovkin
Vovkin

Reputation: 491

Reverse id encoding for url

I'm looking for a function (php) to encode int id into string looks like result of md5, or uuid. Requirements for function is next:

Security is not the point, I just need use such id conversion "perceived" security by customers, indeed used other approaches to make link available only for order owner.

Workflow I see now: I take encoded string from URL, decode it to int, make query using this int value.

I thought about approach, when together with id need store some hash, and use this hash in urls, but if I can use function with requirements I'm asking for, it would be great, because I don't want to add separate filed, index by this field, etc.

Upvotes: 0

Views: 1031

Answers (1)

Related Questions