I am developing a mobile application (implemented in Java), which synchronises data with a web service (implemented in C#). I would like to check whether object received from the server (and saved to the database) has the correct data compared to what is stored on the server.
The solution I have come up with is to create a hash code of an object that could be easily compared between both mobile application and web service.
I was thinking about using (either on server side or in mobile application) native hashCode()
method and then try to reimplement the way it works in one of the languages in the second language. Would that be possible or do I have to override hashCode()
methods in both languages so that it would give same hash codes? Is there any better method to verify data integrity?
The object structure is not very complicated, though each object has many attributes.