Isn't this something for the security forum? --- How are you calculating the MD5 checksum? The Sun JDK contains an MD5 implementation for the JCA (Java Cryptography Architecture) API. See java.security.MessageDigest. - Peter
Joined: Oct 02, 2000
Probably, I think he wants more of the information on the MD5 algorithm than the actual implementation. He's saying that he gets different result on differnt platforms.
Peter den Haan
Joined: Apr 20, 2000
Pity he doesn't give more detail: different machines are mentioned, but are we talking about different software platforms too? If not, for example they both use the Java MessageDigest implementation, then the problem might well be an encoding problem in the conversion from a String to a byte (hint: enforce a standard encoding such as UTF-8 so you're independent of what the platform default encoding happens to be). The MD5 algorithm wouldn't help at all in that case. OTOH if they're different software platforms, perhaps with a broken MD5 implementation, then the algorithm might well help. - Peter