I would like to setup a system where a user can generate a “ticket”.
This ticket will be stored indefinitely. The ticket will be sent to
someone who does not have an account on the system and therefore, I
would like to ensure some level of security in that ticket number.
Basically, the other user would receive an email like:
Please click on the link below to view this ticket:
The stuff at the end would, therefore, be the unique ticket hash. The
system is otherwise secure and there is very little motivation to
reverse engineer the ticket number.
I do, however, need to assure uniqueness in the ticket number among
several hundred/thousand users that will be submitting these, so they
can’t just be random. It will also be stored indefinitely.
Since the ticket number will be a key in a database table, I think it
could be generated as a one-way hash of the date and some other
Can someone suggest a good way to create this?