You want something that is sufficiently random that it can't be easily guessed or gamed, but can be quickly and easily determined on your side.
Salted cryptographic hashes might be a good place to start.
You want something that is sufficiently random that it can't be easily guessed or gamed, but can be quickly and easily determined on your side.
Salted cryptographic hashes might be a good place to start.