c# - Generate a unique number that is formed from 2 numbers and vice versa? -
i not sure if possible but,
i have 2 numbers, 32-bit int x , 64-bit long y.
given 'y' unique.
given these numbers, want generate unique identifier 32-bit int. should able construct individual numbers unique identifier. possible? apologize if wrong forum ask, related c# programming on project working on.
basically, 'x' refers categoryid , 'y' refers unique 'categoryitemid' in database, single category can have million of catalogitems.
thanks!
to sum up:
- you have 96 (== 32 + 64) bits of possible inputs.
- you want unique 32 bit value regardless of input values.
- 32 < 96
it's not possible. entropy of inputs larger entropy of output.
Comments
Post a Comment