Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    It would be easy if he "concatenated" the bits. Two 32bit numbers would give you one 64bit number. No need to play around with strings. Commented Oct 21, 2014 at 12:20
  • 2
    I don't really think just concatenating strings would work, since each user yields his own integer ID first, and then the one of the partner. That way for each user, the string will start always with his own integer ID. Commented Oct 21, 2014 at 12:22
  • This is what I was about to suggest but instead of strings I would use zero-padded binary representation. Note that you also have to always concatenate the IDs in some known order (smaller first for example) to ensure that 23-20 and 20-23 yield same result. Commented Oct 21, 2014 at 12:25