What exactly are you asking or implying? Since the results of GetHashcode
shouldn't be persisted - it is only intended for equality comparisons - then
it shoudln't matter if the results change.
GetHashCode is also not intended to provide security for data.
I'll admit I have never tried to compare the hash results between versions
of the .Net framework but if you're implying that the results of
Cryptography.MD 5 is different between versions of the .Net framework, then
Microsoft has a problem.
The fact is, though, that there's nothing in the documentation of
String.GetHashc ode that says it is MD5. In fact, it says specifically:
"The behavior of GetHashCode is dependent on its implementation, which might
change from one version of the common language runtime to another. A reason
why this might happen is to improve the performance of GetHashCode. If you
require the behavior of GetHashCode be constant, override the runtime
implementation of GetHashCode with an implementation of your own that you
know will never change."
So the short answer to your question is, "No, there is no guarantee."
--
Dale Preston
MCAD C#
MCSE, MCDBA
"MuZZy" wrote:
Hi,
Is there any guarantee that MD5 hashing algorithm implementation will
not change in the next .NET version unlike what's happened to
String.GetHashc ode?
Thank you,
MuZZy