• 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
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Base64 / MD5 Encoding & Decoding

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to do Base64 / MD5 encoding and decoding of password,
How it can be done.
Please help its urgent. please send the code to do that
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Base 64 coding can be done using Jakarta Commons Codec, while MD5 is supported by java.security.MessageDigest.

As to the urgency of your request, Ease Up.
 
Ranch Hand
Posts: 781
Netbeans IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MD5 is a 'hash' algorithm with an output length of 128 bits. This means that the infinity of possible byte arrays that you can hash must ALL map on to the 2^128 possible hash values. Now infinity divided by 2^128 is infinity so that there are an infinity of possible messages for each of the 2^128 possible hash values.

When trying to 'decrypt' a hash value, which of the infinity of possible messages is the one you want?

It is not necessary to 'decrypt' a password hash in order to decide if a user has presented a valid password. Just hash the presented password and compare this hash with the stored hash.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic