The function sequence.crypto/map->md5 does not return the same output for inputs that are semantically the same. An example is given in the bellow code.
The root cause of the issue is that part that convert a map to a byte array. JSON is a predictive mechanism to do such thing. It is very easy to find two different json serialization of the same underlying data structure; {"foo": 4} and {"foo": 4} comes immediately to my minds.
The solution involves walking the data data structure in a predictable way and compute the hash while doing this. I am sure there is a java library that already implements this logic for you.
The function
sequence.crypto/map->md5
does not return the same output for inputs that are semantically the same. An example is given in the bellow code.The root cause of the issue is that part that convert a map to a byte array. JSON is a predictive mechanism to do such thing. It is very easy to find two different json serialization of the same underlying data structure;
{"foo": 4}
and{"foo": 4}
comes immediately to my minds.The solution involves walking the
data
data structure in a predictable way and compute the hash while doing this. I am sure there is a java library that already implements this logic for you.