I think I can use Cantor’s to create a unique hash n = ((x + y)*(x + y) + x – y)/2…
but can I reverse this hash? And if not, can someone provide a similar formula pair for a reversible hash?
Thanks.
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.
if x and y and n are all the same data types.
when x and y are near the datatype::max n will overflow and you will lose information and not be able to recover x and y.
If on the other hand if x and y are always within a range let say 0-FOO
can be a recoverable hash provided again n has not overflown
will give you y. Once y is known (n-y)/Foo will give you x