• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Java MD5 Security problem

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys

i wanted tyo know how does MD5 protocol encrypt a letter.
bcz i am having problems with the encryption.
the encrypted o/p is different on different machines.
plz help

thanks in advance
 
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is the algorithm:
http://www.faqs.org/rfcs/rfc1321.html
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic