I have two numbers fields in the db. One with max 15 digits (say x), and the other one with maximum 5 digits (say y). I need to produce unique number from any pair (x,y), such that for any other pair (w,z), k(x,y) = k(w,z) if and only if x=w and y=z.
Note: I read about Cantor function but since i have a known limit on the number length, i'd like to use a more efficient function to generate the shortest possible key.