aspose file tools
The moose likes Java in General and the fly likes Base64 / MD5 Encoding & Decoding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Base64 / MD5 Encoding & Decoding" Watch "Base64 / MD5 Encoding & Decoding" New topic
Author

Base64 / MD5 Encoding & Decoding

vicky saxena
Greenhorn

Joined: Aug 23, 2005
Posts: 15
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35230
    
    7
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.


Android appsImageJ pluginsJava web charts
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

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.


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
 
I agree. Here's the link: jrebel
 
subject: Base64 / MD5 Encoding & Decoding
 
Similar Threads
How to generate MD5 hash?
Hex binary to Base64 and vice versa
Issues with Codec
Base64 encode decode jars
problem base64 encoding the 3 hex bytes E2 80 A9