Related: Generate a unique string based on a pair of strings
I want to generate an intuitive unique string to denote an ordered pair of strings.
Clearly, stringA + stringB
is very intuitive but not unique if you consider, for example, "st" + "ring" == "stri" + "ng" == "string"
.
Also, unlike the linked OP, I'd like to have uniqueString(stringA, stringB) != uniqueString(stringB, stringA)
, i.e. noncommutative.
Something like MD5(stringA) - MD5(stringB)
might work considering the linked OP, but I feel it's very unintuitive.
Any ideas?