I am asking this question from a perspective that we need to store a set of hashed data that can be queried later for in an ordered fashion.
My situation is that some data has to be encrypted, I am thinking is there any function that I can store the ordering information relative to other data without getting the original value. So that I can sort the collection without original value but with another hashed value or any information that does not leak details on the original value.
Saving A -> store encrypted(A) , store hash(A)
Saving B -> store encrypted(B) , store hash(B)
Saving C -> store encrypted(C) , store hash(C)
if hash(A) < hash(B) < hash(C) then returns [ C, B , A ]
Any hashing function or another function that can do this mathematically ?
lets assume A or B is always numeric based value.