Hash to identify url?
It is necessary to memorize some URLs visited by the user on the site in order to return the user to this address if necessary. For example, the user went to the example.com?part=cart&order=1 page (basket with orders), the address of this page was recorded in the database and the hash of this address returned, for example, 5f41402dbc4b2a76b9231d911017c592 . For each link to an order item, a backurl parameter is added to the link address. Ie, in order to edit a product from the basket, the link to it is of the following type:
example.com?part=goods&id=57483&backurl=5f41402dbc4b2a76b9231d911017c592 Now, after any actions with this product, by pressing the "save" button, the user will be returned to the page with the hash
5f41402dbc4b2a76b9231d911017c592: example.com?part=cart&order=1. Which hash is better to use in this case? The smaller it is (shorter) - the better, I intend to use md5 - its length is 32 characters, and cryptographic resistance does not matter much, since it is not the password that is encrypted, but only the address of the link + the user cannot follow the link of another user, as in the database with the hash is recorded another user ID. I would like something like tinyurl.com