I’m trying to look for a unique 32-bit integer that I can access in C#. The integer should be specific to a particular computer; but it doesn’t have to be collision resistant.
I’ve looked at the MAC Address and ProcessorId, but both are too large to store as Int32.
Any other suggestions (other than truncating the aforementioned identifiers to fit)?
Take you MAC address and/or processorID of whatever else you want to use and run it through a hash function that will produce a 32-bit value.
A simple CRC32 would probably do the job, since you aren’t concerned about collisions.
If it helps, I found a convenient implementation of CRC32 here.