I\'m looking for a way to encrypt/obfuscate an integer ID into another integer. More precisely, I need a function int F(int x), so that
Do anything with the bits of the ID that won't destroy them. For example:
For decryption, do all that in reverse order.
Create a program that will 'encrypt' some interesting values for you and put them in a table you can examine. Have same program TEST your encryption/decryption routine WITH all set of values that you want to have in your system.
Add stuff to the above list into the routines until your numbers will look properly mangled to you.
For anything else, get a copy of The Book.