Link to home
Start Free TrialLog in
Avatar of TornadoV
TornadoVFlag for United States of America

asked on

How to encode QueryString in ASP.NET 2.0 and decode in JSP?

After migrating to a ASP.NET 2.0 application I have to add a link to a legacy application written in Java.  Basically my app will use redirect to a login page with http://localsite/login.jsp?name=John&pwd=Hello.  I do not want to display credentials as clear text, what should be done in order to encrypt querystring in ASP.NET 2.0 and then deciphered on JSP page?
Avatar of frodoman
frodoman
Flag of United States of America image

Querystring is going to be visible whether you encode it or not so I'm not sure what you're asking?  You can encrypt 'John' to be 'H&y4Fv_9' but that isn't going to stop someone from copying 'H&y4Fv_9' and pasting it into a URL at a later date...

If you want to have credentials hidden then don't put them in the querystring!
ASKER CERTIFIED SOLUTION
Avatar of Ramuncikas
Ramuncikas
Flag of Lithuania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TornadoV

ASKER

Frodoman, I'm sorry for not being clear, it's an intranet app, I simply did not want to display user's credentials as clear text in their address bar.  I was looking for Convert.ToBase64String() equivalent in Java since I'm not proficient in it.  

I gave all points to Ramuncikas simply because I've implemented his suggestion even without looking at it first.

Thanks for your help guys!