Encrypt HTTP post parameters from JSP to servlet

风流意气都作罢 提交于 2021-01-19 09:10:25

问题


I have a login JSP which takes username / password from the user in text boxes and on submit it forwards the username/password parameters to Login Servlet using POST method.

Now I am using Paros Proxy in between (as Man-In-The-Middle attack) to trap the parameters. The parameters received from JSP are captured in Paros as plain text.

Is there any specific method provided by Java standard API which we can use to encrypt these parameters such a way that:

  1. Even if the parameters are captured by Paros Proxy, it may not be able to display in plain text.

  2. Servlet do not have to decrypt it.

How can I achieve this?


回答1:


Use SSL to protect your data from being sniffable. If you require that no decoding (probably meaning decrypting) is to be performed on the server side, I cannot think of any other way.



来源:https://stackoverflow.com/questions/12277511/encrypt-http-post-parameters-from-jsp-to-servlet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!