I have an existing app in which I made the mistake of using String.GetHashCode and persisting it to disk. Now that I'm upgrading the app to .Net 2.0 I find that that decision has come back to bite me in the butt.
I'm interested to know if anyone knows about a .Net 2.0 implementation of a .Net 1.1 compatible string hashing algorithm.
Obviously the best solution would be to buy myself a time machine and go back to 2002 and kick myself in the shin for even considering using the hashcode this way. Since that doesn't appear likely I'm looking for a workaround. I have existing users with this data on their systems so it's not possible for me to make one big conversion of the hashes or anything like that.
With the change to 2.0 I will update the code so it uses MD5 or SHA of course.
I considered extracting the String.GetHashCode source from Mono but since Mono is GPL and my app is commercial that really isn't an option. I don't even know if the Mono implementation is compatible with the MS .Net implementation since the contract for GetHashCode wouldn't require it to be compatible.
Any ideas?