Is there an algorithm that will yield the same hash for two numbers, no matter what order they are in?
For example, hashing 3268 and 2642 should yield the same result as hashing 2642 and 3268.
Is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Of course, XOR does that.
There’s a lot more (addition, multiplication, basically any commutative operation), but XOR is usually used for hashing anyway (because it’s easy to “unhash”).