aspose file tools*
The moose likes Servlets and the fly likes Help:: how can I do the base64 encoding? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Help:: how can I do the base64 encoding? " Watch "Help:: how can I do the base64 encoding? " New topic
Author

Help:: how can I do the base64 encoding?

Zoe Peng
Ranch Hand

Joined: Nov 27, 2000
Posts: 112
Hello,
How can I do the base64 encoding?
I have username and password from usr input form.
I want to encode these data with base64.
How to approach this? I found out there is a BASE64Encoder in javax.commerce.util package. But, I really don't know how this works. Thakns.

//get usrname and password
String username = request.getParameter("username");
String password = request.getParameter("password");
String userInfo = username + password;

out.println(userInfo);
//encoder username and password
BASE64Encoder encoder = new BASE64Encoder();
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Wow, I had a look at the API for that encoder and it is very confusing.
You could try another implementation such as this one.
James.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help:: how can I do the base64 encoding?