Request
We need a php-only system to map a filepath/filename.ext to a UUID in a way that can be reversible.
Example
For example:
maps/shop1.jpg -> 342abfec-31fdfg-23131
The user can access this map only from
loader.php?token=342abfec-31fdfg-23131
The loader.php must be able to 'reverse' the UUID so the script can send maps/show1.jpg.
The goal
Main goal in this phase is not to secure content access.
Our goal for now is only to add an "opacity" level to avoid that an user can open for example shop2.jpg simply changing the URL.
The problem
We cannot, for now, save UUID<-->file mapping into a DB or similar.
So I've the request to create 'on the fly' the UUID corresponding to a filepath/filename.txt, and this UUID must be reversible so a PHP script can 'decode' it and serve the corresponding file.
Question
Does a reversible string to UUID algorithm already exist?